/* Custom Properties */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-primary: 0 20px 40px rgba(102, 126, 234, 0.3);
    --shadow-secondary: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 25px 50px rgba(102, 126, 234, 0.4);
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.05)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100px 100px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(120deg); }
    66% { transform: translate(-10px, 10px) rotate(240deg); }
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem;
}

.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 4rem);
}

.main-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-primary);
    max-width: 600px;
    width: 100%;
    transition: var(--transition);
    animation: slideInUp 0.8s ease-out;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Header */
.card-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title i {
    margin-right: 0.75rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

/* Card Body */
.card-body {
    padding: 2rem;
}

/* Tabs */
.conversion-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Input Sections */
.input-section {
    margin-bottom: 2rem;
}

.form-label {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: #4facfe;
}

.input-field {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    padding: 1rem;
    transition: var(--transition);
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4facfe;
    box-shadow: 0 0 0 0.2rem rgba(79, 172, 254, 0.25);
    outline: none;
    color: white;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.unit-text {
    background: var(--success-gradient);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 0 12px 12px 0;
}

/* Time Inputs */
.time-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-separator {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0.5rem;
}

/* Conversion Arrow */
.conversion-arrow {
    text-align: center;
    margin: 2rem 0;
    animation: pulse 2s ease-in-out infinite;
}

.conversion-arrow i {
    color: #4facfe;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(79, 172, 254, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Result Section */
.result-section {
    margin-bottom: 2rem;
}

.result-display {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.result-value {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.result-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-calculate,
.btn-reset {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-calculate {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(79, 172, 254, 0.4);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Info Section */
.info-section {
    margin-top: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
}

.info-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card h3 i {
    color: #4facfe;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card strong {
    color: white;
}

.form-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem 0.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .time-inputs {
        flex-direction: column;
        gap: 1rem;
    }
    
    .time-separator {
        display: none;
    }
    
    .conversion-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
}