/* Affirmation Generator Page Styles */

:root {
    --aff-primary: #667eea;
    --aff-secondary: #764ba2;
    --aff-accent: #f093fb;
    --aff-gold: #ffd700;
    --aff-dark: #2d3436;
    --aff-light: #f8f9ff;
    --aff-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

/* Header */
.affirmation-header {
    text-align: center;
    padding: 60px 30px;
    background: var(--aff-gradient);
    border-radius: 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

/* Particles Animation */
.header-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    animation: float-particle 6s ease-in-out infinite;
    opacity: 0.6;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; top: 60%; animation-delay: 1s; }
.particle:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; }
.particle:nth-child(5) { left: 90%; top: 40%; animation-delay: 4s; }

@keyframes float-particle {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 1; }
}

.header-content {
    position: relative;
    z-index: 1;
}

.affirmation-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 20px 0;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.3);
}

.title-emoji {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.title-emoji:last-child {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.affirmation-subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.today-info {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.2);
    padding: 12px 25px;
    border-radius: 30px;
    color: white;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.divider {
    opacity: 0.5;
}

/* Keyword Section */
.keyword-section {
    background: var(--aff-light);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.keyword-section h2 {
    text-align: center;
    color: var(--aff-dark);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.keyword-section h2 span {
    margin-right: 10px;
}

.keyword-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.random-keyword-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #8B6914 0%, #6B5210 100%);
    border: none;
    border-radius: 50px;
    color: #FFF5D6;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(107, 82, 16, 0.4);
}

.random-keyword-btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #9B7916 0%, #7B6212 100%);
    box-shadow: 0 15px 40px rgba(107, 82, 16, 0.5);
}

.random-keyword-btn .btn-icon {
    font-size: 1.3rem;
    animation: dice-shake 2s ease-in-out infinite;
}

@keyframes dice-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.keyword-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    gap: 20px;
    color: #999;
    font-size: 0.9rem;
}

.keyword-divider::before,
.keyword-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.keyword-select-wrapper {
    width: 100%;
    max-width: 400px;
}

.keyword-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

.keyword-select:focus {
    outline: none;
    border-color: var(--aff-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* Selected Keyword Display */
.selected-keyword {
    text-align: center;
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    animation: fade-in 0.5s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.keyword-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--aff-gradient);
    padding: 15px 35px;
    border-radius: 50px;
    margin-bottom: 15px;
}

.keyword-icon {
    font-size: 2rem;
}

.keyword-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.keyword-desc {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Affirmation Result Section */
.affirmation-result {
    margin-bottom: 40px;
    animation: slide-up 0.6s ease;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.affirmation-result h2 {
    text-align: center;
    color: var(--aff-dark);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.affirmation-result h2 span {
    margin-right: 10px;
}

/* Affirmation Card */
.card-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.affirmation-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1.2;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--aff-gradient);
    transition: background 0.5s ease;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.card-date {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.card-keyword {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 10px 25px;
    border-radius: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(5px);
}

.card-keyword-icon {
    font-size: 1.5rem;
}

.card-keyword-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.card-affirmation {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 20px;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.2);
}

.card-sub-message {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 30px;
}

.card-footer {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
}

.card-brand {
    font-size: 0.85rem;
    opacity: 0.8;
    letter-spacing: 2px;
}

/* Style Options */
.style-options {
    background: var(--aff-light);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
}

.style-options h4 {
    text-align: center;
    color: var(--aff-dark);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.style-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border: 2px solid transparent;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.style-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.style-btn.active {
    border-color: var(--aff-primary);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.style-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.style-btn span:last-child {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--aff-dark);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.regenerate-btn {
    background: white;
    border: 2px solid var(--aff-primary);
    color: var(--aff-primary);
}

.regenerate-btn:hover {
    background: var(--aff-primary);
    color: white;
}

.copy-btn {
    background: white;
    border: 2px solid #4ECDC4;
    color: #4ECDC4;
}

.copy-btn:hover {
    background: #4ECDC4;
    color: white;
}

.download-btn {
    background: var(--aff-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

/* More Affirmations Section */
.more-affirmations {
    background: white;
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.more-affirmations h2 {
    text-align: center;
    color: var(--aff-dark);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.more-affirmations h2 span {
    margin-right: 10px;
}

.affirmation-list {
    display: grid;
    gap: 15px;
}

.affirmation-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--aff-light);
    border-radius: 15px;
    border-left: 4px solid var(--aff-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.affirmation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.affirmation-item.selected {
    border-left-color: var(--aff-accent);
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--aff-gradient);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.item-text {
    flex: 1;
    color: var(--aff-dark);
    line-height: 1.6;
    font-size: 1rem;
}

/* Daily Fortune Section */
.daily-fortune {
    background: linear-gradient(145deg, #fff9e6 0%, #fff0f5 100%);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.daily-fortune h2 {
    text-align: center;
    color: var(--aff-dark);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.daily-fortune h2 span {
    margin-right: 10px;
}

.fortune-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.fortune-card {
    background: white;
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.fortune-card:hover {
    transform: translateY(-5px);
}

.fortune-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}

.fortune-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--aff-dark);
    margin-bottom: 10px;
}

.fortune-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.fortune-stars span {
    font-size: 1rem;
    color: var(--aff-gold);
}

.fortune-message {
    text-align: center;
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
    padding: 20px;
    background: white;
    border-radius: 15px;
    margin: 0;
}

/* Copy Toast */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .affirmation-header {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .affirmation-title {
        font-size: 1.8rem;
    }

    .affirmation-subtitle {
        font-size: 1rem;
    }

    .today-info {
        flex-direction: column;
        gap: 8px;
        padding: 15px 20px;
    }

    .divider {
        display: none;
    }

    .keyword-section {
        padding: 30px 20px;
    }

    .random-keyword-btn {
        width: 100%;
        max-width: 300px;
    }

    .keyword-badge {
        padding: 12px 25px;
    }

    .keyword-text {
        font-size: 1.3rem;
    }

    .affirmation-card {
        max-width: 100%;
        aspect-ratio: 1 / 1.3;
    }

    .card-content {
        padding: 30px 20px;
    }

    .card-affirmation {
        font-size: 1.2rem;
    }

    .card-sub-message {
        font-size: 0.9rem;
    }

    .style-options {
        padding: 20px 15px;
    }

    .style-buttons {
        gap: 8px;
    }

    .style-btn {
        min-width: 70px;
        padding: 10px 12px;
    }

    .style-preview {
        width: 35px;
        height: 35px;
    }

    .style-btn span:last-child {
        font-size: 0.7rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .more-affirmations {
        padding: 30px 20px;
    }

    .daily-fortune {
        padding: 30px 20px;
    }

    .fortune-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fortune-card {
        padding: 15px 10px;
    }

    .fortune-icon {
        font-size: 1.5rem;
    }

    .fortune-label {
        font-size: 0.8rem;
    }

    .fortune-stars span {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .affirmation-title {
        font-size: 1.5rem;
    }

    .keyword-badge {
        flex-direction: column;
        gap: 8px;
    }

    .keyword-icon {
        font-size: 2.5rem;
    }

    .card-keyword {
        padding: 8px 20px;
    }

    .card-affirmation {
        font-size: 1.1rem;
    }

    .style-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .affirmation-item {
        padding: 15px;
    }

    .item-text {
        font-size: 0.95rem;
    }
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--aff-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

