/* ======================
   WIFI PASSWORD VIEWER STYLES
   ====================== */

/* CSS Variables for consistent theming */
:root {
    /* Primary Colors - Security Theme */
    --primary-color: #e74c3c;
    --primary-light: #ec7063;
    --primary-dark: #c0392b;
    --primary-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    
    /* Secondary Colors */
    --secondary-color: #f39c12;
    --secondary-light: #f7dc6f;
    --secondary-dark: #d68910;
    
    /* Accent Colors */
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    /* Neutral Colors */
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --gray-800: #212529;
    --gray-900: #0d1117;
    
    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;
    --text-inverse: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    --shadow-xl: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #212529;
        --bg-secondary: #343a40;
        --bg-tertiary: #495057;
        --text-primary: #f8f9fa;
        --text-secondary: #adb5bd;
        --text-tertiary: #6c757d;
    }
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-feature-settings: 'liga' 1, 'kern' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Container */
.tool-page {
    min-height: 100vh;
    position: relative;
    padding: 2rem;
}

.tool-section {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    padding: 3rem;
}

.tool-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Security Disclaimer */
.disclaimer {
    background: linear-gradient(135deg, #fff3cd 0%, #fef9e7 100%);
    border: 2px solid var(--warning-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.disclaimer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--warning-color) 0%, var(--secondary-light) 100%);
}

.disclaimer h3 {
    color: var(--secondary-dark);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.disclaimer h3 i {
    color: var(--warning-color);
    font-size: 1.5rem;
}

.disclaimer ul {
    list-style: none;
    padding: 0;
}

.disclaimer li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2rem;
    color: var(--secondary-dark);
    font-weight: 500;
    border-bottom: 1px solid rgba(243, 156, 18, 0.1);
}

.disclaimer li:last-child {
    border-bottom: none;
}

.disclaimer li::before {
    content: '⚠';
    position: absolute;
    left: 0.5rem;
    color: var(--warning-color);
    font-weight: bold;
    font-size: 1rem;
}

/* Instructions Section */
.instructions {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    margin: 2rem 0;
}

.instructions h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions ol {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.instructions li {
    counter-increment: step-counter;
    position: relative;
    padding: 1rem 0 1rem 3rem;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    font-weight: 500;
}

.instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary-gradient);
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

/* Code Blocks */
.code-block {
    background: #282c34;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
}

.code-block code {
    color: #61dafb;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    margin-right: 1rem;
}

.copy-btn {
    background: var(--accent-color);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.copy-btn.copied {
    background: var(--success-color);
}

/* Platform Detection */
.platform-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    margin: 2rem 0;
}

.platform-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.platform-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--gray-200);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.platform-tab.active {
    background: var(--primary-gradient);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.platform-content {
    display: none;
}

.platform-content.active {
    display: block;
}

/* Security Notes */
.security-note {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 2px solid var(--success-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.security-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--success-color);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.security-note h4 {
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-note p {
    color: #2d5016;
    font-weight: 500;
}

/* Troubleshooting Section */
.troubleshooting {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    margin: 2rem 0;
}

.troubleshooting h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1rem 1.5rem;
    background: var(--gray-100);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    background: var(--gray-200);
}

.faq-answer {
    padding: 1.5rem;
    display: none;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-page {
        padding: 1rem;
    }
    
    .tool-section {
        padding: 1.5rem;
    }
    
    .tool-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .platform-tabs {
        flex-direction: column;
    }
    
    .code-block {
        flex-direction: column;
        gap: 1rem;
    }
    
    .code-block code {
        margin-right: 0;
    }
    
    .copy-btn {
        align-self: flex-end;
    }
}

/* Print Styles */
@media print {
    .copy-btn,
    .platform-tabs {
        display: none !important;
    }
    
    .tool-section {
        box-shadow: none;
        border: 1px solid #000;
        margin: 0;
        padding: 1rem;
    }
    
    .tool-header h1 {
        color: #000;
        -webkit-text-fill-color: initial;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.copy-btn:focus,
.platform-tab:focus,
.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
