:root {
    --primary: #BC002D;        /* 日本红 */
    --secondary: #FFFFFF;       /* 白 */
    --accent: #FFD700;          /* 金 */
    --light: #f8f9fa;
    --dark: #343a40;
    --success: #BC002D;
    --button-bg: #BC002D;
    --button-hover: #8B0000;    /* 暗红 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #BC002D, #FFFFFF, #BC002D);
    color: #333;
    min-height: 100vh;
    padding: 5px;
    line-height: 1.5;
}

.container {
    width: 100%;
    min-width: 100%;
    margin: 0 auto 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #FFFFFF, #FFD700, #BC002D);
    color: #333;
    padding: 10px;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
}

.top-section {
    display: flex;
    width: 100%;
    gap: 10px;
}

.converter-section, .indian-section {
    width: 50%;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.output-section {
    width: 100%;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #BC002D;
}

.calendar-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    position: relative;
}

.calendar-icon svg {
    width: 100%;
    height: 100%;
}

h2 {
    color: #BC002D;
    font-size: 1.3rem;
}

.input-section {
    margin-bottom: 10px;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    min-width: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    white-space: nowrap;
}

input, select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

input:focus, select:focus {
    border-color: #BC002D;
    box-shadow: 0 0 0 2px rgba(188, 0, 45, 0.2);
    outline: none;
}

.input-hint {
    color: #666;
    font-size: 0.75rem;
    margin-top: 2px;
    display: block;
}

.examples {
    color: #666;
    font-size: 0.75rem;
    margin-top: 2px;
    font-style: italic;
}

.note {
    color: #666;
    font-size: 0.8rem;
    margin-top: 5px;
    font-style: italic;
    border-left: 2px solid #BC002D;
    padding-left: 5px;
}

.convert-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

button {
    background: var(--button-bg);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.result {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #BC002D;
}

.result h3 {
    color: #BC002D;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.result p {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* 横排卡片布局 */
.calendar-results {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    justify-content: flex-start;
}

.calendar-result-item {
    flex: 1 1 250px;
    min-width: 200px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #FFD700;
    transition: transform 0.2s;
}

.calendar-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.calendar-result-item h4 {
    color: #BC002D;
    margin-bottom: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-result-item p {
    margin: 5px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.calendar-region {
    color: #BC002D;
    font-weight: 600;
}

.calendar-date {
    color: #BC002D;
    font-weight: 600;
    font-size: 1.1rem;
}

.accuracy-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: normal;
    margin-left: 5px;
}

.accuracy-exact {
    background: #28a745;
    color: white;
}

.accuracy-good {
    background: #17a2b8;
    color: white;
}

.accuracy-approximate {
    background: #ffc107;
    color: #333;
}

.result-header {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-title {
    font-weight: bold;
    color: #555;
}

.result-value {
    font-weight: 600;
    color: #BC002D;
}

.indian-display {
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.indian-title {
    font-weight: bold;
    color: #BC002D;
    font-size: 1.2rem;
    margin-bottom: 12px;
    text-align: center;
}

.indian-date {
    color: #BC002D;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.indian-gregorian {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.indian-time {
    color: #BC002D;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

.indian-holiday {
    color: #BC002D;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    text-align: center;
}

.info-section {
    width: 100%;
    padding: 10px;
    background: #fff5f5;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.info-box {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.info-box h3 {
    color: #BC002D;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.info-box h3 i {
    margin-right: 8px;
    font-size: 1rem;
}

.highlight {
    background: linear-gradient(120deg, #FFD700 0%, #FFD700 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: 0 88%;
    font-weight: 600;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    border: 1px solid #f5c6cb;
}

.loading-spinner {
    display: inline-block;
    color: white;
}

.button-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.copy-btn {
    background: #6c757d;
    font-size: 0.8rem;
    padding: 4px 8px;
}

.copy-btn:hover {
    background: #5a6268;
}

@media (max-width: 768px) {
    body {
        padding: 3px;
    }
    
    .content {
        padding: 8px;
    }
    
    .top-section {
        flex-direction: column;
    }
    
    .converter-section, .indian-section {
        width: 100%;
    }
    
    .calendar-results {
        flex-direction: column;
    }
    
    .calendar-result-item {
        width: 100%;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    input, select {
        padding: 6px;
    }
    
    button {
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .indian-title {
        font-size: 1.1rem;
    }
    
    .indian-time {
        font-size: 1.1rem;
    }
}