* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.header-content {
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #667eea;
}

.logo h1 {
    font-size: 2.5rem;
    color: #333;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.back-btn {
    position: absolute;
    top: 0;
    left: 0;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    margin: 0 20px 20px;
}

/* Tabs */
.converter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    min-width: 120px;
    justify-content: center;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tab-btn i {
    font-size: 1rem;
}

/* Converter Container */
.converter-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.converter-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.converter-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.panel-header h2 i {
    color: #667eea;
}

.panel-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Converter Form */
.converter-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: end;
    max-width: 800px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-wrapper input,
.input-wrapper select {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input[readonly] {
    background: #f8f9fa;
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.swap-btn {
    width: 50px;
    height: 50px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    margin-top: 20px;
}

.swap-btn:hover {
    background: #5a6fd8;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.swap-btn i {
    color: white;
    font-size: 1.2rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    justify-content: center;
}

.clear-btn {
    background: #ff6b6b;
    color: white;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.copy-btn {
    background: #4ecdc4;
    color: white;
}

.copy-btn:hover {
    background: #45b7af;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px;
    margin: 0 20px 20px;
    border-radius: 15px;
    color: #666;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 0;
    }

    .header,
    .main-content,
    .footer {
        margin: 10px;
    }

    .header {
        padding: 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .back-btn {
        position: relative;
        margin-bottom: 20px;
        align-self: flex-start;
    }

    .converter-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
        min-width: auto;
        flex: 1;
    }

    .tab-btn span {
        display: none;
    }

    .converter-container {
        padding: 20px;
    }

    .converter-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .swap-btn {
        order: 2;
        margin: 10px auto;
        transform: rotate(90deg);
    }

    .swap-btn:hover {
        transform: rotate(270deg) scale(1.1);
    }

    .input-group:last-child {
        order: 3;
    }

    .panel-header h2 {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .converter-tabs {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
    }

    .tab-btn {
        justify-content: center;
    }

    .converter-container {
        padding: 15px;
    }

    .input-wrapper input,
    .input-wrapper select {
        padding: 12px;
    }
}

/* Success Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 0.3s ease;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}