/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 50%, #f0f8ff 100%);
    min-height: 100vh;
    color: #2c3e50;
    position: relative;
    overflow-x: hidden;
}

/* Background Elements */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(135, 206, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.floating-crosses {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.cross {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 215, 0, 0.15);
    animation: float 20s infinite ease-in-out;
}

.cross-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.cross-2 {
    top: 60%;
    right: 15%;
    animation-delay: -7s;
    font-size: 1.5rem;
}

.cross-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: -14s;
    font-size: 1.8rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
    25% { transform: translateY(-20px) rotate(5deg); opacity: 0.2; }
    50% { transform: translateY(-10px) rotate(-3deg); opacity: 0.15; }
    75% { transform: translateY(-30px) rotate(8deg); opacity: 0.1; }
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.halo-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.halo-icon .fas {
    font-size: 3rem;
    color: #ffd700;
    opacity: 0.8;
    position: relative;
    z-index: 2;
}

.halo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 3s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes glow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.main-title {
    font-family: 'Crimson Text', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #5a6c7d;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Main Content */
.main-content {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Input Section */
.input-section {
    width: 100%;
    text-align: center;
}

.input-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 1rem;
}

.input-container {
    position: relative;
    margin-bottom: 0.5rem;
}

.number-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: 3px solid #e3f2fd;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.number-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.input-decoration {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.number-input:focus + .input-decoration {
    opacity: 1;
}

.input-help {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Button Section */
.button-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.get-advice-btn, .random-btn, .another-advice-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.get-advice-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2c3e50;
    min-width: 160px;
}

.get-advice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

.random-btn {
    background: linear-gradient(135deg, #87ceeb 0%, #b0e0e6 100%);
    color: #2c3e50;
    min-width: 120px;
}

.random-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(135, 206, 235, 0.4);
}

.another-advice-btn {
    background: linear-gradient(135deg, #98fb98 0%, #90ee90 100%);
    color: #2c3e50;
    margin-top: 1rem;
}

.another-advice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(152, 251, 152, 0.4);
}

/* Button Active States */
.get-advice-btn:active, .random-btn:active, .another-advice-btn:active {
    transform: translateY(-1px);
}

/* Advice Container */
.advice-container {
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}

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

.advice-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.advice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #87ceeb, #98fb98);
    border-radius: 20px 20px 0 0;
}

.advice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.quote-icon {
    font-size: 1.5rem;
    color: #ffd700;
    opacity: 0.7;
}

.advice-number {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.advice-text {
    font-family: 'Crimson Text', serif;
    font-size: 1.4rem;
    line-height: 1.8;
    color: #2c3e50;
    text-align: center;
    margin: 1.5rem 0;
    font-weight: 400;
}

.advice-footer {
    text-align: right;
}

/* Music Control */
.music-control {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.music-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e3f2fd;
    border-radius: 50px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #2c3e50;
    backdrop-filter: blur(10px);
}

.music-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.music-btn.playing {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
}

.music-indicator {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-indicator.active {
    opacity: 1;
}

.sound-wave {
    display: flex;
    gap: 2px;
    align-items: end;
}

.sound-wave span {
    width: 3px;
    height: 10px;
    background: #ffd700;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.sound-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.sound-wave span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 20px; }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    z-index: 1000;
}

.footer i {
    color: #e74c3c;
    margin: 0 0.5rem;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffd700;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .music-control {
        top: 1rem;
        right: 1rem;
    }
    
    .music-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .button-section {
        flex-direction: column;
        align-items: center;
    }
    
    .get-advice-btn, .random-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .advice-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .advice-card {
        padding: 1.5rem;
    }
    
    .advice-text {
        font-size: 1.1rem;
    }
    
    .footer {
        font-size: 0.8rem;
        padding: 0 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .main-title {
        color: #000;
        -webkit-text-fill-color: #000;
    }
    
    .advice-text {
        color: #000;
    }
    
    .number-input {
        border-color: #000;
    }
}