/*! 
 * Free Tools - Professional Design (DupliChecker Style)
 * Clean, Beautiful, Functional
 */

/* =========================
   BASE STYLES
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================
   HEADER
   ========================= */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.2s;
}

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

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow);
}

.nav {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.btn-blue {
    background: var(--primary);
    color: white;
}

.btn-blue:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-outline-gray {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--border);
}

.btn-outline-gray:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =========================
   SECTIONS
   ========================= */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text);
}

/* =========================
   TOOLS GRID
   ========================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.tool-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    border: 1px solid var(--border);
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--text);
}

.tool-card p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.5;
}

/* =========================
   TOOL PAGE
   ========================= */
.tool-page {
    min-height: calc(100vh - 200px);
}

.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 48px 0;
    text-align: center;
}

.tool-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tool-header p {
    font-size: 18px;
    opacity: 0.95;
}

.tool-interface {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-top: -40px;
    margin-bottom: 40px;
    position: relative;
}

.tool-section {
    margin-bottom: 24px;
}

.tool-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 15px;
}

.tool-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.tool-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.stat-box {
    background: var(--bg);
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

/* =========================
   CONTENT SECTIONS
   ========================= */
.content-section {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.content-section h2 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--text);
}

.content-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.content-section ul, .content-section ol {
    margin-left: 24px;
    margin-bottom: 16px;
    color: var(--text-light);
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.content-section h3 {
    font-size: 22px;
    margin: 24px 0 12px;
    color: var(--text);
}

/* =========================
   FAQ SECTION
   ========================= */
.faq-section {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.faq-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--text);
}

.faq-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 14px;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

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

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

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

/* =========================
   ALERTS
   ========================= */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.alert.show {
    opacity: 1;
    transform: translateY(0);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* =========================
   FOOTER
   ========================= */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 14px;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-interface {
        padding: 24px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
