@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ee0979 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 
                0 0 50px rgba(255, 255, 255, 0.1) inset;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 50%, #ff9a9e 100%);
    background-size: 200% 200%;
    animation: headerGradient 8s ease infinite;
    padding: 40px 30px;
    text-align: center;
    color: white;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes headerGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    background: linear-gradient(45deg, #ffffff, #fff5f5);
    -webkit-background-clip: text;
    background-clip: text;
}

.date {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.input-section {
    padding: 40px 30px;
    text-align: center;
}

.input-section h2 {
    color: #333;
    margin-bottom: 30px;
    font-weight: 500;
    font-size: 1.3rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

#birthdate {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#birthdate:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

#fortuneBtn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

#fortuneBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.4);
}

#fortuneBtn:active {
    transform: translateY(0);
}

.result-section {
    padding: 30px;
    animation: fadeIn 0.6s ease;
}

.result-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.fortune-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.fortune-category {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.fortune-category:hover {
    transform: translateY(-3px);
}

.fortune-category:nth-child(1) { border-left-color: #ffb347; }
.fortune-category:nth-child(2) { border-left-color: #ff6b9d; }
.fortune-category:nth-child(3) { border-left-color: #4ecdc4; }
.fortune-category:nth-child(4) { border-left-color: #45b7d1; }

.category-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.fortune-category h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.fortune-category p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.lucky-section {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
}

.lucky-section h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.lucky-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lucky-items p {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    backdrop-filter: blur(5px);
}

.lucky-items strong {
    font-weight: 600;
}

.summary-section {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.summary-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.summary-section h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.summary-content {
    position: relative;
    z-index: 1;
}

.summary-content p {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    font-size: 1rem;
    line-height: 1.6;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 95%;
        margin: 0 auto;
        border-radius: 25px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-section {
        padding: 30px 25px;
    }
    
    .result-section {
        padding: 25px 20px;
    }
    
    .fortune-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .fortune-category {
        padding: 18px;
    }
    
    .lucky-section, .summary-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        margin: 0;
        border-radius: 20px;
        max-width: 100%;
    }
    
    header {
        padding: 25px 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .input-section, .result-section {
        padding: 20px 15px;
    }
    
    .input-section h2 {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
    
    #birthdate {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    #fortuneBtn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .fortune-category {
        padding: 15px;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    .fortune-category h4 {
        font-size: 1rem;
    }
    
    .fortune-category p {
        font-size: 0.9rem;
    }
    
    .lucky-section, .summary-section {
        padding: 18px 15px;
    }
    
    .lucky-items p {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .summary-content p {
        padding: 15px;
        font-size: 0.95rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 600px;
    }
    
    .fortune-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .input-section {
        padding: 50px 40px;
    }
    
    .result-section {
        padding: 40px 35px;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: 550px;
    }
    
    .fortune-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .input-section {
        padding: 50px 40px;
    }
    
    .result-section {
        padding: 45px 40px;
    }
    
    header {
        padding: 45px 35px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
    }
    100% {
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    }
}