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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    position: relative;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

/* Language Toggle */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-toggle-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Input Section */
.input-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    width: 100%;
    max-width: 500px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-actions h2 {
    color: #333;
    font-weight: 500;
    margin: 0;
}


.date-input-container {
    margin-bottom: 30px;
}

.date-selects {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    max-width: 150px;
}

.select-group label {
    font-weight: 500;
    color: #555;
    text-align: center;
}

.date-select {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    text-align: center;
}

.date-select:focus {
    outline: none;
    border-color: #667eea;
}

.date-select:hover {
    border-color: #667eea;
}

.find-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.find-btn:hover {
    transform: translateY(-2px);
}

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

/* Result Section */
.result-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    animation: fadeInUp 0.5s ease;
}

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

.result-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.flower-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flower-image {
    width: 100%;
    max-width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.flower-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flower-name {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.flower-korean-name {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

.flower-meaning,
.flower-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.flower-meaning h4,
.flower-description h4 {
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.flower-details {
    display: flex;
    gap: 15px;
    align-items: center;
}

.season-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.color-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: inline-block;
}

/* Message Section */
.message-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.message-section h4 {
    color: white;
    margin-bottom: 15px;
    font-weight: 500;
}

.personal-message {
    background: rgba(255,255,255,0.95);
    padding: 25px;
    border-radius: 15px;
    color: #333;
    line-height: 1.8;
    white-space: pre-line;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.personal-message p {
    margin: 0;
    white-space: pre-line;
}

.message-info {
    margin-top: 10px;
    text-align: center;
}

.message-info small {
    color: rgba(255,255,255,0.8);
    font-size: 0.8em;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1;
    min-width: 160px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


.try-again-btn {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Favorites Styles */
.favorites-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    animation: fadeInUp 0.5s ease;
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: rgba(255,255,255,0.8);
    margin-top: 40px;
}

.footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .input-section,
    .result-section {
        padding: 20px;
    }
    
    .result-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .flower-image {
        max-width: 200px;
        height: 200px;
    }
    
    .flower-name {
        font-size: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    
    .favorites-list {
        grid-template-columns: 1fr;
    }
    
    .language-toggle {
        position: relative;
        top: auto;
        right: auto;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-actions h2 {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .input-methods {
        gap: 15px;
    }
    
    .flower-details {
        justify-content: center;
        flex-wrap: wrap;
    }
    
}