/* Iron Man Theme CSS */
:root {
    --iron-red: #ff0000;
    --iron-gold: #ffd700;
    --iron-dark-red: #cc0000;
    --iron-light-red: #ff3333;
    --iron-dark: #1a1a1a;
    --iron-darker: #0d0d0d;
    --iron-gray: #333333;
    --iron-light-gray: #666666;
    --iron-white: #ffffff;
    --iron-blue: #0066cc;
    --iron-green: #00ff00;
    --iron-orange: #ff6600;
    
    --gradient-primary: linear-gradient(135deg, var(--iron-red), var(--iron-dark-red));
    --gradient-gold: linear-gradient(135deg, var(--iron-gold), #ffed4e);
    --gradient-dark: linear-gradient(135deg, var(--iron-dark), var(--iron-darker));
    
    --shadow-glow: 0 0 20px rgba(255, 0, 0, 0.3);
    --shadow-gold: 0 0 15px rgba(255, 215, 0, 0.4);
    --shadow-dark: 0 0 10px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--gradient-dark);
    color: var(--iron-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navigation */
.iron-nav {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--iron-red);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-glow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--iron-red);
    text-shadow: var(--shadow-glow);
}

.nav-brand i {
    font-size: 2rem;
    color: var(--iron-gold);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--iron-white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: var(--gradient-primary);
    color: var(--iron-white);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

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

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-width: auto;
}

.language-btn.active {
    background: var(--gradient-primary);
    color: var(--iron-white);
    box-shadow: var(--shadow-glow);
}

/* Buttons */
.iron-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.iron-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.iron-btn:hover::before {
    left: 100%;
}

.iron-btn.primary {
    background: var(--gradient-primary);
    color: var(--iron-white);
    box-shadow: var(--shadow-glow);
}

.iron-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
}

.iron-btn.secondary {
    background: transparent;
    color: var(--iron-white);
    border: 2px solid var(--iron-red);
}

.iron-btn.secondary:hover {
    background: var(--iron-red);
    box-shadow: var(--shadow-glow);
}

.iron-btn.danger {
    background: transparent;
    color: var(--iron-red);
    border: 2px solid var(--iron-red);
}

.iron-btn.danger:hover {
    background: var(--iron-red);
    color: var(--iron-white);
    box-shadow: var(--shadow-glow);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.section {
    display: none;
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.section.active {
    display: block;
}

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

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

.iron-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--iron-red);
    text-shadow: var(--shadow-glow);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.iron-title i {
    color: var(--iron-gold);
    font-size: 2.5rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--iron-light-gray);
    max-width: 600px;
    margin: 0 auto;
}

.dashboard-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Upload Section */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed var(--iron-red);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    background: rgba(255, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--iron-gold);
    background: rgba(255, 215, 0, 0.1);
    box-shadow: var(--shadow-gold);
    transform: scale(1.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 4rem;
    color: var(--iron-red);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    color: var(--iron-white);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--iron-light-gray);
    margin-bottom: 1rem;
}

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

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.iron-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--iron-white);
}

.iron-label i {
    color: var(--iron-gold);
}

.iron-input,
.iron-select {
    padding: 0.75rem;
    border: 2px solid var(--iron-gray);
    border-radius: 8px;
    background: var(--iron-dark);
    color: var(--iron-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.iron-input:focus,
.iron-select:focus {
    outline: none;
    border-color: var(--iron-red);
    box-shadow: var(--shadow-glow);
}

/* Progress Bar */
.upload-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--iron-gray);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    color: var(--iron-light-gray);
}

/* Speed Test Section */
.speedtest-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.speedtest-circle {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.circle-bg {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: conic-gradient(var(--iron-red) 0deg, var(--iron-gray) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-glow);
}

.circle-bg::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--iron-dark);
}

.circle-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.speed-value {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--iron-red);
    text-shadow: var(--shadow-glow);
}

.speed-unit {
    font-size: 1.2rem;
    color: var(--iron-gold);
    font-weight: 600;
}

.speedtest-controls {
    margin: 2rem 0;
}

.speedtest-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.result-card {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--iron-red);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

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

.result-icon {
    font-size: 2rem;
    color: var(--iron-gold);
}

.result-info {
    text-align: left;
}

.result-label {
    color: var(--iron-light-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.result-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--iron-white);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: rgba(255, 0, 0, 0.05);
    border: 2px solid var(--iron-red);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    color: var(--iron-white);
    font-size: 1.2rem;
}

.card-header i {
    color: var(--iron-gold);
    font-size: 1.5rem;
}

.stat-item,
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--iron-gray);
}

.stat-item:last-child,
.status-item:last-child {
    border-bottom: none;
}

.stat-label,
.status-label {
    color: var(--iron-light-gray);
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--iron-white);
}

.status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-indicator.online {
    background: var(--iron-green);
    color: var(--iron-dark);
}

.status-indicator.offline {
    background: var(--iron-red);
    color: var(--iron-white);
}

/* Footer */
.iron-footer {
    background: var(--iron-darker);
    border-top: 2px solid var(--iron-red);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--iron-red);
}

.footer-brand i {
    color: var(--iron-gold);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--iron-light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--iron-red);
}

.footer-copyright {
    color: var(--iron-light-gray);
    font-size: 0.9rem;
}

/* Test History */
.test-history {
    margin-top: 3rem;
    text-align: left;
}

.test-history h3 {
    color: var(--iron-white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.history-list {
    background: rgba(255, 0, 0, 0.05);
    border: 2px solid var(--iron-red);
    border-radius: 15px;
    padding: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--iron-gray);
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 0, 0, 0.1);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    color: var(--iron-light-gray);
    font-size: 0.9rem;
}

.history-speed {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--iron-white);
}

/* Email Input Group */
.email-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-input-group .iron-input {
    flex: 1;
}

.email-send-btn {
    padding: 12px;
    min-width: auto;
    flex-shrink: 0;
    background: #00ff00;
    color: #000;
}

.email-send-btn:hover {
    background: #00cc00;
    transform: scale(1.05);
}

.email-send-btn:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.email-settings-btn {
    padding: 12px;
    min-width: auto;
    flex-shrink: 0;
}

.email-settings-btn:hover {
    background: #ffd700;
    color: #000;
    transform: scale(1.05);
}

/* Navigation Email Link */
.nav-link[href="email-settings.html"] {
    position: relative;
}

.nav-link[href="email-settings.html"]:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
}

.nav-link[href="email-settings.html"]:hover::after {
    content: "📧";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: pulse 1s infinite;
}

/* Email notification indicator */
.email-notification-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    animation: slideInRight 0.5s ease-out;
}

.email-notification-indicator i {
    margin-right: 8px;
    color: #ffd700;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .nav-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .iron-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-options {
        grid-template-columns: 1fr;
    }
    
    .speedtest-circle {
        margin: 2rem 0;
    }
    
    .circle-bg {
        width: 250px;
        height: 250px;
    }
    
    .circle-bg::before {
        width: 200px;
        height: 200px;
    }
    
    .speed-value {
        font-size: 2rem;
    }
    
    .speedtest-results {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
    }
    
    .circle-bg {
        width: 200px;
        height: 200px;
    }
    
    .circle-bg::before {
        width: 160px;
        height: 160px;
    }
    
    .speed-value {
        font-size: 1.5rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .dashboard-card {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
    100% { box-shadow: var(--shadow-glow); }
}

.pulse {
    animation: pulse 2s infinite;
}

.glow {
    animation: glow 2s infinite;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Uploaded Files Styles */
.uploaded-file {
    background: rgba(255, 0, 0, 0.05);
    border: 2px solid var(--iron-red);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.uploaded-file:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-info i {
    font-size: 2rem;
    color: var(--iron-gold);
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    color: var(--iron-white);
    margin-bottom: 0.25rem;
}

.file-meta {
    display: flex;
    gap: 1rem;
    color: var(--iron-light-gray);
    font-size: 0.9rem;
}

.file-size {
    color: var(--iron-gold);
    font-weight: 500;
}

.file-date {
    color: var(--iron-light-gray);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .uploaded-file {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .file-actions {
        justify-content: center;
    }
    
    .file-meta {
        justify-content: center;
    }
}
