/* HackZona - Custom CSS */

:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --dark: #212529;
    --darker: #1a1d20;
    --hz-green: #00ff88;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1d20 0%, #2d3436 100%);
    min-height: 100vh;
}

/* Fix long text overflow */
* {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

code, pre {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    max-width: 100%;
}

.card {
    overflow: hidden;
}

.card-body {
    overflow-wrap: break-word;
}

/* HZ Logo */
.logo-hz {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--hz-green) 0%, #00cc6a 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: #000;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 5px 30px rgba(0, 255, 136, 0.6); }
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 5px;
}

.language-selector a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 2px;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
}

.language-selector a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-selector a.active {
    background: var(--primary);
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #212529 !important;
}

.card-title, .card-text, .card h1, .card h2, .card h3, .card h4, .card h5, .card h6, .card p {
    color: #212529 !important;
}

/* Tool cards */
.quick-tool-card, .hover-card .card-body {
    background: rgba(255, 255, 255, 0.95);
    color: #212529 !important;
}

.quick-tool-card h6, .hover-card h5, .hover-card p, .hover-card small {
    color: #212529 !important;
}

/* Sidebar heading color fix */
.sidebar-heading {
    color: #adb5bd !important;
}

/* Dashboard Cards */
.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, #0a58ca 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 48px;
    opacity: 0.8;
}

.stat-card h3 {
    font-size: 36px;
    font-weight: bold;
    margin: 15px 0;
}

/* Sidebar */
.sidebar {
    background: var(--darker);
    min-height: 100vh;
    padding: 20px 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    margin: 5px 15px;
    border-radius: 10px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link.active {
    background: var(--primary);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* Table */
.table-dark {
    background: var(--darker);
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
}

/* Port Scanner Results */
.port-result {
    background: var(--darker);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.port-result.open {
    border-left: 4px solid var(--success);
}

.port-result.closed {
    border-left: 4px solid var(--danger);
}

/* Badge */
.badge-premium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
}

/* Loading Spinner */
.spinner-container {
    text-align: center;
    padding: 40px;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(13, 110, 253, 0.2);
    border-top-color: var(--primary);
}

/* Alert */
.alert {
    border-radius: 10px;
    border: none;
}

/* Premium Banner */
.premium-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.premium-banner h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.premium-banner .btn {
    background: white;
    color: #f5576c;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}


/* Social Links */
.social-links .btn {
    font-size: 12px;
    padding: 8px;
    border-radius: 8px;
}

.social-links .btn i {
    margin-right: 5px;
}


/* ========== MODERN IMPROVEMENTS ========== */

/* Glass Effect Cards */
.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Gradient Background */
body.bg-dark {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    background-attachment: fixed;
}

/* Modern Quick Tool Cards */
.quick-tool-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.quick-tool-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.quick-tool-card i {
    transition: all 0.3s ease;
}

.quick-tool-card:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* Gradient Headers */
.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Neon Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

/* Stat Cards with Gradient */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Modern Input Fields */
.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control-lg {
    font-size: 1.1rem;
    padding: 15px 20px;
}

/* Sidebar Modern */
.sidebar {
    background: linear-gradient(180deg, #0f0c29 0%, #302b63 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding-left: 25px;
}

.sidebar .nav-link.active {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

/* HZ Logo Animation Enhanced */
.logo-hz {
    background: linear-gradient(135deg, #00ff88 0%, #00d9ff 100%);
    animation: pulse-glow 2s infinite, rotate-slow 10s infinite linear;
    position: relative;
    overflow: hidden;
}

.logo-hz::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 8px 40px rgba(0, 255, 136, 0.6);
        transform: scale(1.05);
    }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Premium Banner Modern */
.premium-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.3);
    position: relative;
    overflow: hidden;
}

.premium-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: slide 3s infinite;
}

@keyframes slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Tool Cards Grid */
.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.hover-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Alert Modern */
.alert {
    border-radius: 15px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border-left-color: #198754;
    color: #0d5132;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border-left-color: #0dcaf0;
    color: #055160;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
    color: #664d03;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 1s linear infinite;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .quick-tool-card {
        margin-bottom: 15px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .logo-hz {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Badge Modern */
.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}

/* Code Blocks */
code, pre {
    border-radius: 8px;
    background: #f8f9fa;
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
}

/* Table Modern */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
