/* LibreMonero Converter - Styles */

:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --secondary-color: #FF6B35;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --border-color: #E1E8ED;
    --success-color: #27AE60;
    --error-color: #E74C3C;
    --info-color: #3498DB;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 300;
}

.logo-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary-color);
}

.github-link {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white !important;
    border-radius: 6px;
    transition: background 0.2s;
}

.github-link:hover {
    background: var(--primary-dark);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.refresh-info {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #FFF4E6;
    color: #E67E22;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Converter Card */
.converter-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.converter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.input-group {
    flex: 1;
}

.amount-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
    font-weight: 500;
}

.amount-input:focus {
    border-color: var(--primary-color);
}

.amount-input:read-only {
    background: var(--bg-color);
    cursor: default;
}

/* Currency Selector */
.currency-selector {
    position: relative;
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 140px;
}

.currency-btn:hover {
    border-color: var(--primary-color);
    background: white;
}

.currency-icon {
    font-size: 1.5rem;
}

.currency-icon.xmr-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.currency-code {
    font-size: 1rem;
    color: var(--text-primary);
}

.dropdown-arrow {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.currency-btn:hover .dropdown-arrow {
    transform: translateY(2px);
}

/* Currency Dropdown */
.currency-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 10;
    max-height: 400px;
    overflow-y: auto;
}

.currency-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-color);
}

.dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 10px 10px;
}

.dropdown-item .currency-icon {
    font-size: 1.25rem;
}

.dropdown-item .currency-icon.xmr-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.currency-info {
    display: flex;
    flex-direction: column;
}

.currency-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.currency-symbol {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.25rem 0;
}

/* Swap Button */
.swap-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.swap-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.swap-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

/* Rate Info */
.rate-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    margin-top: 1.5rem;
}

.rate-text {
    font-weight: 600;
    color: var(--text-primary);
}

.last-update {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Status Message */
.status-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #D5F5E3;
    color: var(--success-color);
}

.status-message.error {
    background: #FADBD8;
    color: var(--error-color);
}

.status-message.info {
    background: #D6EAF8;
    color: var(--info-color);
}

/* About Section */
.about-section {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.about-content p {
    margin-bottom: 1rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .converter-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .currency-btn {
        width: 100%;
        justify-content: center;
    }

    .currency-dropdown {
        left: 0;
        right: 0;
    }

    .nav {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .about-section {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .amount-input {
        font-size: 1.25rem;
        padding: 0.875rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}
