/* ===================================
   ヨエコの今日の運勢スロット - スタイルシート
   =================================== */

:root {
    /* カラーパレット - 音楽的で個性的な雰囲気 */
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --accent-color: #ffa502;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --text-light: #ffffff;
    --text-dark: #2d3436;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --glow-color: rgba(255, 107, 157, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 背景の装飾アニメーション */
body::before {
    content: '♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 60px;
    opacity: 0.05;
    animation: floatMusic 20s infinite linear;
    pointer-events: none;
    letter-spacing: 80px;
    line-height: 150px;
    z-index: 0;
}

@keyframes floatMusic {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-200px);
    }
}

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

/* ===================================
   ヘッダー
   =================================== */

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.title-main {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-light);
    text-shadow: 
        2px 2px 4px var(--shadow-color),
        0 0 20px var(--glow-color);
    letter-spacing: 0.05em;
}

.title-sub {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 
        2px 2px 4px var(--shadow-color),
        0 0 15px rgba(255, 165, 2, 0.6);
}

.subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 2px var(--shadow-color);
}

/* ===================================
   スロットマシン
   =================================== */

.slot-machine {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 
        0 15px 40px var(--shadow-color),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.slot-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.slot-reel {
    width: 100px;
    height: 120px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border: 4px solid var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.slot-reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
}

.slot-symbol {
    font-size: 4rem;
    transition: transform 0.3s ease;
}

.slot-reel.spinning .slot-symbol {
    animation: spin 0.1s infinite linear;
}

@keyframes spin {
    0% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(0.8);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

/* ===================================
   スピンボタン
   =================================== */

.spin-button {
    width: 100%;
    padding: 20px;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 
        0 8px 20px rgba(255, 107, 157, 0.4),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    position: relative;
    overflow: hidden;
}

.spin-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.spin-button:hover::before {
    width: 300px;
    height: 300px;
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 30px rgba(255, 107, 157, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.spin-button:active {
    transform: translateY(0);
    box-shadow: 
        0 5px 15px rgba(255, 107, 157, 0.4),
        inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-text,
.button-icon {
    position: relative;
    z-index: 1;
}

.button-icon {
    font-size: 1.6rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===================================
   結果表示
   =================================== */

.result-container,
.already-drawn {
    display: none;
    animation: fadeInScale 0.6s ease-out;
}

.result-container.show,
.already-drawn.show {
    display: block;
}

.result-card,
.info-card {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 
        0 15px 40px var(--shadow-color),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    text-align: center;
}

.result-rank,
.today-rank {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6348 100%);
    color: var(--text-light);
    box-shadow: 0 5px 20px rgba(255, 165, 2, 0.4);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.result-message,
.today-message {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.result-footer {
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
    padding-top: 20px;
    margin-top: 20px;
}

.next-draw {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 700;
}

/* ===================================
   既に引いた場合の表示
   =================================== */

.info-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: rotate 3s infinite linear;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.info-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.today-result {
    margin-bottom: 25px;
}

.info-note {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 500;
}

/* ===================================
   フッター
   =================================== */

.footer {
    text-align: center;
    margin-top: 30px;
    animation: fadeIn 1s ease-out 0.5s both;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 700;
}

.footer-link a {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.footer-link a:hover {
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(255, 165, 2, 0.8);
}

/* ===================================
   アニメーション
   =================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   レスポンシブデザイン
   =================================== */

@media (max-width: 768px) {
    .title-main {
        font-size: 1.8rem;
    }
    
    .title-sub {
        font-size: 1.5rem;
    }
    
    .slot-machine {
        padding: 30px 20px;
    }
    
    .slot-reel {
        width: 80px;
        height: 100px;
    }
    
    .slot-symbol {
        font-size: 3rem;
    }
    
    .spin-button {
        font-size: 1.2rem;
        padding: 18px;
    }
    
    .result-rank,
    .today-rank {
        font-size: 2.5rem;
        padding: 12px 25px;
    }
    
    .result-message,
    .today-message {
        font-size: 1rem;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .title-main {
        font-size: 1.5rem;
    }
    
    .title-sub {
        font-size: 1.3rem;
    }
    
    .slot-display {
        gap: 10px;
    }
    
    .slot-reel {
        width: 70px;
        height: 90px;
        border: 3px solid var(--primary-color);
    }
    
    .slot-symbol {
        font-size: 2.5rem;
    }
    
    .result-card,
    .info-card {
        padding: 30px 20px;
    }
}
