/* ===================================
   DevTools Website - Main Stylesheet
   Modern, Responsive, Gradient Design
   =================================== */

/* CSS Variables for Theming */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --accent-color: #00f2fe;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation Bar */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
}

nav .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav .logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

nav .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

nav .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

nav .nav-links a:hover {
    color: var(--accent-color);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Main Container */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--primary-gradient);
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

/* Tool Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tool-card a {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tool-card a:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Tool Page Layout */
.tool-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Tool Interface */
.tool-interface {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.input-section, .output-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-section h3, .output-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

textarea, input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 150px;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

button, .btn {
    padding: 0.8rem 2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover, .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--secondary-gradient);
}

.btn-copy {
    background: var(--accent-gradient);
}

/* Article Section */
.article-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.article-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.article-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-section ul, .article-section ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-section li {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.faq-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Similar Tools Section */
.similar-tools {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.similar-tools h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.similar-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.similar-tool-link {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.similar-tool-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 2rem;
        top: 1.5rem;
    }
    
    nav .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    nav .nav-links.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-container, .article-section, .faq-section, .similar-tools {
        padding: 1.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.8rem;
    }
    
    main {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    button, .btn {
        width: 100%;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

