/**
 * ============================================================================
 * CARD GENERATOR - Professional Stylesheet
 * ============================================================================
 * Version: 2.0
 * Author: Professional Development Team
 * Description: Modern dark theme with compact, efficient design
 * ============================================================================
 */

/* ========================================================================== */
/* CSS VARIABLES - Design System */
/* ========================================================================== */

:root {
    /* Color Palette */
    --primary-color: #4ade80;           /* Main accent color (green) */
    --primary-hover: #22c55e;           /* Hover state */
    
    /* Background Colors */
    --bg-primary: #0f172a;              /* Dark navy */
    --bg-secondary: #1e293b;            /* Lighter navy */
    --bg-tertiary: #334155;             /* Medium slate */
    
    /* Text Colors */
    --text-primary: #f1f5f9;            /* Light text */
    --text-secondary: #94a3b8;          /* Muted text */
    
    /* Border & Effects */
    --border-color: #334155;            /* Default border */
    --border-active: #4ade80;           /* Active/focus border */
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);  /* Box shadow */
}

/* ========================================================================== */
/* GLOBAL RESET */
/* ========================================================================== */

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

/* ========================================================================== */
/* BASE STYLES */
/* ========================================================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
}

/* ========================================================================== */
/* NAVIGATION BAR */
/* ========================================================================== */

.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

/* Brand Section */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: translateY(-2px);
}

.nav-logo {
    color: var(--primary-color);
    flex-shrink: 0;
}

.nav-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.nav-tagline {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(74, 222, 128, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(74, 222, 128, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
}

.nav-icon {
    flex-shrink: 0;
}

/* Navbar Dropdown */
.nav-dropdown-item {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    margin-left: -2px;
}

.nav-dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 320px;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-height: 500px;
    overflow-y: auto;
}

.nav-dropdown-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    display: block;
}

.nav-dropdown-item-select {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.nav-dropdown-item-select:last-child {
    border-bottom: none;
}

.nav-dropdown-item-select:hover {
    background: rgba(74, 222, 128, 0.1);
}

.card-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.nav-dropdown-item-select:hover .card-icon-box {
    background: rgba(74, 222, 128, 0.15);
}

.card-icon {
    color: var(--text-secondary);
}

.nav-dropdown-item-select:hover .card-icon {
    color: var(--primary-color);
}

.nav-dropdown-icon {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.nav-dropdown-content {
    flex: 1;
}

.nav-dropdown-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.nav-dropdown-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Scrollbar for dropdown */
.nav-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-dropdown-menu::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.nav-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Mobile Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(74, 222, 128, 0.1);
}

.hamburger {
    position: relative;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Responsive Navigation */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-secondary);
        width: 280px;
        height: calc(100vh - 70px);
        padding: 20px;
        gap: 5px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
        justify-content: flex-start;
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        max-width: none;
        margin-top: 8px;
        margin-left: 0;
        box-shadow: none;
        border: 1px solid var(--border-color);
        background: var(--bg-primary);
        border-radius: 8px;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        display: block;
    }

    .nav-dropdown-menu.active {
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 800px;
        transform: none;
        display: block !important;
        overflow-y: auto;
    }
    
    .nav-dropdown-item {
        position: relative;
    }
    
    .nav-dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .dropdown-arrow {
        margin-left: auto;
        opacity: 1 !important;
    }

    .nav-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 60px;
        padding: 0 15px;
    }

    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
        width: 100%;
    }

    .nav-name {
        font-size: 1rem;
    }

    .nav-tagline {
        font-size: 0.65rem;
    }

    .nav-logo {
        width: 28px;
        height: 28px;
    }
    
    /* Larger touch targets for mobile */
    .nav-dropdown-item-select {
        padding: 16px;
        min-height: 60px;
    }
    
    .card-icon-box {
        width: 44px;
        height: 44px;
    }
    
    .nav-dropdown-name {
        font-size: 0.95rem;
    }
    
    .nav-dropdown-desc {
        font-size: 0.8rem;
    }
}

/* ========================================================================== */
/* HEADER */
/* ========================================================================== */

header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
    padding: 10px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================================================== */
/* TAB NAVIGATION */
/* ========================================================================== */

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 3px;
}

.tab-button {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-button:hover:not(.active) {
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

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

/* ========================================================================== */
/* FORM ELEMENTS */
/* ========================================================================== */

.form-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

/* Network Selection Cards */
.network-section {
    margin-bottom: 20px;
}

.section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.network-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(74, 222, 128, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.network-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
}

.network-card:hover::before {
    opacity: 1;
}

.network-card.active {
    border-color: var(--primary-color);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.3);
}

.network-card.active::before {
    opacity: 1;
}

.network-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.network-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.network-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--bg-primary);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.network-card.active .network-check {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 768px) {
    .network-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .network-card {
        padding: 10px 6px;
    }

    .network-icon {
        font-size: 20px;
    }

    .network-name {
        font-size: 0.75rem;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.form-control {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========================================================================== */
/* TOGGLE SWITCHES */
/* ========================================================================== */

.toggle-group {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 42px;
    height: 22px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-secondary);
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

.toggle-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ========================================================================== */
/* BUTTONS */
/* ========================================================================== */

.btn-generate {
    width: 100%;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
}

.btn-generate:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.3);
}

.btn-generate:active {
    transform: translateY(0);
}

.icon {
    display: inline-block;
}

/* ========================================================================== */
/* RESULTS DISPLAY */
/* ========================================================================== */

.results-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-header h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.results-actions {
    display: flex;
    gap: 8px;
}

.btn-copy,
.btn-reset {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
}

.btn-reset:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.results-output {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
}

.results-output::-webkit-scrollbar {
    width: 10px;
}

.results-output::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.results-output::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.results-output::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ========================================================================== */
/* HELPER ELEMENTS */
/* ========================================================================== */

.hint {
    display: block;
    margin-top: 3px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========================================================================== */
/* INFO BOX (Advanced Tab Placeholder) */
/* ========================================================================== */

.info-box {
    text-align: center;
    padding: 40px;
}

.info-box h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.info-box p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-box ul {
    list-style: none;
    display: inline-block;
    text-align: left;
}

.info-box ul li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.info-box ul li::before {
    content: '✓ ';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

/* ========================================================================== */
/* FOOTER */
/* ========================================================================== */

footer {
    text-align: center;
    padding: 15px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* ========================================================================== */
/* RESPONSIVE DESIGN */
/* ========================================================================== */

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .form-container {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .results-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
        flex-direction: row;
    }

    .btn-copy,
    .btn-reset {
        flex: 1;
        justify-content: center;
    }
}

/* ========================================================================== */
/* ANIMATIONS */
/* ========================================================================== */

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.btn-generate.success {
    animation: pulse 0.5s ease;
}

/* ========================================================================== */
/* END OF STYLESHEET */
/* ========================================================================== */

