* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.container {
    background: white;
    width: 500px;
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Window Header */
.window-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
}

.close {
    background: #ff5f57;
}

.minimize {
    background: #ffbd2e;
}

.maximize {
    background: #28ca42;
}

.window-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    flex-grow: 1;
    text-align: center;
    letter-spacing: -0.3px;
}

.spacer {
    width: 70px;
}

/* Form Styles */
#converter-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
}

.mac-input {
    width: 100%;
    height: 52px;
    padding: 0 52px;
    font-size: 18px;
    font-weight: 500;
    color: #1d1d1f;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.mac-input:focus {
    background: white;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-focus-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007bff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mac-input:focus+.input-focus-indicator {
    transform: scaleX(1);
}

/* Currency Selectors */
.conversion-section {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin: 32px 0;
}

.currency-selector {
    flex: 1;
}

.selector-label {
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mac-select-container {
    position: relative;
    cursor: pointer;
}

.selected-option {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mac-select-container:hover .selected-option {
    background: white;
    border-color: #007bff;
}

.flag-icon {
    width: 28px;
    height: 21px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.currency-code {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.dropdown-arrow {
    color: #6c757d;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.mac-select-container:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.mac-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
}

/* Swap Button */
.swap-button-container {
    margin-bottom: 10px;
}

#swap-currencies {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6c757d;
    background: white;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

#swap-currencies:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: rotate(180deg);
}

/* Result Section */
.result-section {
    margin: 32px 0;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.result-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.result-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversion-rate {
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

.converted-amount {
    font-size: 32px;
    font-weight: 700;
    color: #007bff;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 12px;
    margin: 32px 0;
}

.mac-button {
    flex: 1;
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.mac-button.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.mac-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.mac-button.secondary {
    background: white;
    color: #495057;
    border: 2px solid #e9ecef;
}

.mac-button.secondary:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.mac-button.tertiary {
    background: transparent;
    color: #6c757d;
    border: 2px solid transparent;
}

.mac-button.tertiary:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Last Updated */
.last-updated {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 24px;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
}

/* Loading Animation */
@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Error state */
.error {
    color: #dc3545 !important;
}

/* Maximized state */
.container.maximized {
    width: 95vw !important;
    height: 95vh !important;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 520px) {
    .container {
        width: 100%;
        margin: 0 20px;
    }

    #converter-form {
        padding: 24px;
    }

    .conversion-section {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .swap-button-container {
        align-self: center;
        margin: 0;
    }

    .form-actions {
        flex-direction: column;
    }
}