/* Display Refresh Rate Analyzer - Professional CSS Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #764ba2;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Content Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 40px 0;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.card h3 {
    color: #764ba2;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Tool Interface */
.tool-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.controls {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.metric {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.metric:hover {
    transform: scale(1.05);
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animation Canvas */
#animationCanvas {
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    display: block;
}

/* Progress Bars */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Form Elements */
input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    margin: 5px 0;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Search and Filter */
.search-container {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Monitor Database Styles */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.monitor-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.monitor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.monitor-card.selected {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8f0ff);
}

.monitor-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* Comparison Panel */
.comparison-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.comparison-panel.active {
    transform: translateY(0);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.blog-tags {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* FAQ Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.faq-question h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.faq-toggle {
    font-size: 1.5rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

/* Chart Containers */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* Status Indicators */
.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.excellent {
    background: #d4edda;
    color: #155724;
}

.status.good {
    background: #d1ecf1;
    color: #0c5460;
}

.status.average {
    background: #fff3cd;
    color: #856404;
}

.status.poor {
    background: #f8d7da;
    color: #721c24;
}

/* Loading Animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 50px 0 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin: 8px 0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #999;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .controls {
        justify-content: center;
    }
    
    .metrics {
        grid-template-columns: 1fr;
    }
    
    .comparison-panel {
        padding: 15px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .monitor-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-container {
        padding: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    #animationCanvas {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    nav {
        padding: 0 15px;
        height: 60px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .tool-container {
        padding: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .chart-container {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .hero, .card, .tool-container {
        background: white;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn {
        background: #667eea;
        color: white;
    }
    
    header, footer {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .card, .tool-container {
        background: rgba(52, 73, 94, 0.95);
        color: #ecf0f1;
    }
    
    .card h2, .card h3 {
        color: #3498db;
    }
    
    table {
        background: #34495e;
        color: #ecf0f1;
    }
    
    th {
        background: linear-gradient(135deg, #3498db, #2980b9);
    }
    
    tr:hover {
        background: rgba(52, 152, 219, 0.1);
    }
    
    input, select, textarea {
        background: #34495e;
        color: #ecf0f1;
        border-color: #556983;
    }
    
    .monitor-card {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .blog-card {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .faq-question {
        background: linear-gradient(135deg, #34495e, #2c3e50);
        color: #ecf0f1;
    }
    
    .faq-question:hover {
        background: linear-gradient(135deg, #2c3e50, #1a252f);
    }
    
    .metric {
        background: linear-gradient(135deg, #34495e, #2c3e50);
        color: #ecf0f1;
    }
    
    .metric-value {
        color: #3498db;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .btn {
        background: black;
        color: white;
        border: 2px solid black;
    }
    
    .card, .tool-container {
        background: white;
        color: black;
        border: 2px solid black;
    }
    
    .card h2, .card h3 {
        color: black;
    }
    
    a {
        color: blue;
        text-decoration: underline;
    }
    
    a:visited {
        color: purple;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading {
        animation: none;
        border: 3px solid #667eea;
    }
    
    .pulse {
        animation: none;
    }
}