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

body {
    font-family: 'Courier New', monospace;
    background: #fff;
    min-height: 100vh;
    padding: 20px;
    color: #000;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
}

h1 {
    background: #fff;
    color: #000;
    text-align: center;
    padding: 20px;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid #ccc;
}

.subtitle {
    text-align: center;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666666;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #ccc;
}

.calculator-section {
    padding: 30px;
    border-bottom: 1px solid #ddd;
}

.calculator-section:last-child {
    border-bottom: none;
}

.calculator-container {
    margin: 0;
    background: #fff;
}

.reference-date-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 25px;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.reference-date-bar label {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    min-width: auto;
}

.tab-bar {
    display: flex;
    border-bottom: 2px solid #ddd;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    background: #f0f0f0;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #666;
    transition: all 0.2s ease;
}

.tab:hover {
    background: #e8e8e8;
    color: #333;
}

.tab.active {
    background: #fff;
    color: #000;
    border-bottom-color: #fff;
}

.tab-content {
    display: none;
    padding: 25px;
}

.tab-content.active {
    display: block;
    text-align: center;
}

.tab-content .input-group {
    display: inline-flex;
    justify-content: center;
}

h2 {
    color: #000;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

label {
    font-weight: bold;
    color: #000;
    min-width: 80px;
    text-transform: uppercase;
    font-size: 12px;
}

input[type="date"],
input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: #fff;
}

input[type="number"] {
    width: 120px;
}

input[type="date"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #999;
    background: #fff;
}

button {
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    transition: background 0.1s ease;
    letter-spacing: 0.5px;
}

button:hover {
    background: #555;
}

button:active {
    background: #777;
}

.unit-selector {
    position: relative;
    display: inline-block;
}

.unit-button {
    background: none;
    color: #000;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.unit-button::after {
    content: ' ▾';
    font-size: 10px;
    color: #999;
}

.unit-button:hover {
    color: #666;
}

.unit-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    min-width: 100px;
    z-index: 1000;
    display: none;
}

.unit-dropdown.show {
    display: block;
}

.unit-option {
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    color: #000;
}

.unit-option:last-child {
    border-bottom: none;
}

.unit-option:hover {
    background: #333;
    color: #fff;
}

.quick-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 20px 0 10px;
}

.quick-label {
    font-size: 12px;
    color: #ccc;
    margin: 0 8px;
}

.quick-buttons button {
    background: none;
    color: #888;
    border: none;
    padding: 6px 10px;
    font-size: 13px;
}

.quick-buttons button:hover {
    color: #000;
}

.quick-buttons .go-button {
    background: #333;
    color: #fff;
    padding: 8px 16px;
    font-weight: bold;
}

.quick-buttons .go-button:hover {
    background: #555;
    color: #fff;
}

.result {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
    color: #000;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.result:empty {
    display: none;
}

.result.highlight {
    background: #333;
    color: #fff;
    font-weight: bold;
}

@media (max-width: 600px) {
    .container {
        margin: 10px;
    }
    
    h1 {
        font-size: 20px;
        padding: 15px;
    }
    
    .calculator-section {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .quick-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .quick-label:last-of-type {
        margin-left: 0;
    }
}

.age-main {
    background: #fff;
    color: #000;
    padding: 0 0 10px 0;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.age-breakdown-compact {
    background: #fff;
    color: #666;
    padding: 10px 0 0 0;
    font-size: 13px;
    text-align: center;
    line-height: 1.6;
}

.share-button {
    display: block;
    margin: 15px auto 0;
    background: none;
    color: #999;
    border: 1px dashed #ccc;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
}

.share-button:hover {
    color: #000;
    border-color: #999;
    background: none;
}

.birthday-countdown {
    background: #f5f5f5;
    color: #333;
    padding: 12px;
    margin-top: 15px;
    font-size: 13px;
    text-align: center;
    border: 1px dashed #ccc;
}

@media (max-width: 600px) {
    .calculator-container {
        margin: 10px;
    }

    .reference-date-bar {
        flex-wrap: wrap;
        padding: 15px;
    }

    .tab-content {
        padding: 15px;
    }
}