/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* スカイブルー・朝のカラーパレット */
    --sky-light: #e8f4fc;
    --sky-soft: #b8dff5;
    --sky-main: #7fc4eb;
    --sky-accent: #4aa8d8;
    --sky-deep: #2d8abf;
    --morning-gold: #ffd699;
    --morning-orange: #ffb366;
    --white: #ffffff;
    --text-dark: #2c4251;
    --text-medium: #5a7d8c;
    --text-light: #8ba3af;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(180deg, 
        var(--sky-light) 0%, 
        var(--sky-soft) 40%, 
        var(--sky-main) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

/* 朝の雲の装飾 */
body::before,
body::after {
    content: '';
    position: fixed;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 100px;
    z-index: 0;
    animation: float-cloud 20s ease-in-out infinite;
}

body::before {
    width: 200px;
    height: 60px;
    top: 15%;
    left: -50px;
    animation-delay: 0s;
}

body::after {
    width: 150px;
    height: 45px;
    top: 25%;
    right: -30px;
    animation-delay: -10s;
}

@keyframes float-cloud {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(30px); opacity: 0.8; }
}

.container {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(45, 138, 191, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

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

/* ヘッダー - 朝焼けのイメージ */
.header {
    background: linear-gradient(135deg, 
        var(--sky-accent) 0%, 
        var(--sky-main) 50%,
        var(--morning-gold) 100%);
    color: white;
    text-align: center;
    padding: 45px 20px;
    position: relative;
    overflow: hidden;
}

/* 朝日のアクセント */
.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, 
        rgba(255, 214, 153, 0.4) 0%, 
        transparent 70%);
    animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.morning-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
    animation: sunrise 3s ease-in-out infinite;
}

@keyframes sunrise {
    0%, 100% { transform: translateY(0); filter: brightness(1); }
    50% { transform: translateY(-5px); filter: brightness(1.2); }
}

.title {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(45, 138, 191, 0.3);
    letter-spacing: 0.05em;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.95;
    letter-spacing: 0.1em;
}

/* メインコンテンツ */
.main-content {
    padding: 50px 30px;
}

/* テーマ表示エリア */
.theme-display {
    background: linear-gradient(135deg, 
        var(--sky-light) 0%, 
        rgba(184, 223, 245, 0.5) 100%);
    border-radius: 20px;
    padding: 60px 40px;
    margin-bottom: 40px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 4px 20px rgba(45, 138, 191, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border: 1px solid rgba(127, 196, 235, 0.3);
}

.theme-display.shuffling {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.theme-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
}

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

.theme-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.7;
    animation: fadeInText 0.5s ease-out;
}

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

/* シャッフルボタン - 清潔感のあるスカイブルー */
.shuffle-button {
    width: 100%;
    background: linear-gradient(135deg, 
        var(--sky-accent) 0%, 
        var(--sky-deep) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 22px 40px;
    font-size: 1.3rem;
    font-weight: 500;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 
        0 8px 25px rgba(45, 138, 191, 0.3),
        0 2px 0 rgba(255, 255, 255, 0.2) inset;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shuffle-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.shuffle-button:hover::before {
    left: 100%;
}

.shuffle-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(45, 138, 191, 0.4),
        0 2px 0 rgba(255, 255, 255, 0.2) inset;
}

.shuffle-button:active {
    transform: translateY(0);
    box-shadow: 
        0 6px 20px rgba(45, 138, 191, 0.3),
        0 2px 0 rgba(255, 255, 255, 0.2) inset;
}

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

.button-icon {
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.shuffle-button:hover .button-icon {
    animation: spin-once 0.6s ease;
}

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

.button-text {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

/* インフォメーション */
.info {
    margin-top: 40px;
    text-align: center;
}

.info-text {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(232, 244, 252, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(127, 196, 235, 0.2);
}

.info-icon {
    font-size: 1.3rem;
}

/* フッター */
.footer {
    background: linear-gradient(180deg, 
        rgba(232, 244, 252, 0.5) 0%, 
        rgba(184, 223, 245, 0.3) 100%);
    text-align: center;
    padding: 25px 20px;
    color: var(--text-medium);
    font-size: 0.9rem;
    border-top: 1px solid rgba(127, 196, 235, 0.2);
}

/* シェアセクション */
.share-section {
    margin-bottom: 15px;
}

.share-title {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.share-btn:active {
    transform: translateY(0);
}

/* 各SNSのカラー */
.share-line {
    background: #06C755;
}

.share-x {
    background: #000000;
}

.share-facebook {
    background: #1877F2;
}

.share-hatena {
    background: #00A4DE;
}

.share-copy {
    background: var(--sky-accent);
}

.share-copy.copied {
    background: #10b981;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    body::before,
    body::after {
        display: none;
    }

    .morning-icon {
        font-size: 2rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 40px 20px;
    }

    .theme-display {
        padding: 40px 25px;
        min-height: 240px;
    }

    .theme-icon {
        font-size: 3rem;
    }

    .theme-text {
        font-size: 1.4rem;
    }

    .shuffle-button {
        font-size: 1.1rem;
        padding: 18px 30px;
        border-radius: 14px;
    }

    .button-text {
        font-size: 1.1rem;
    }

    .info-text {
        font-size: 0.85rem;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 35px 15px;
    }

    .morning-icon {
        font-size: 1.8rem;
    }

    .title {
        font-size: 1.6rem;
    }

    .theme-display {
        padding: 30px 20px;
        min-height: 200px;
        border-radius: 16px;
    }

    .theme-text {
        font-size: 1.2rem;
    }

    .theme-icon {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .shuffle-button {
        padding: 16px 25px;
        border-radius: 12px;
    }

    .share-btn {
        width: 40px;
        height: 40px;
    }

    .share-buttons {
        gap: 10px;
    }
}
