:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --text: #333;
    --light: #f8f9fa;
    --white: #fff;
    --border: #e8e8e8;
    --success: #28a745;
    --warning: #ffc107;
}

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

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

/* Navigation */
.navbar {
    background: var(--primary);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span { color: var(--accent); }

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

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.nav-links .btn {
    padding: 8px 18px;
    border-radius: 4px;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover { background: #d13650; }

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover { background: rgba(255,255,255,0.1); }

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

.btn-secondary:hover { background: #1a2a4a; }

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

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

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

/* Section */
.section {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 40px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tool-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.tool-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.tool-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.tool-card .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 15px;
}

.badge-live { background: #d4edda; color: #155724; }
.badge-soon { background: #fff3cd; color: #856404; }

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.auth-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 1.6rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-box .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: #666;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

/* Dashboard */
.dashboard {
    padding: 40px 20px;
    min-height: calc(100vh - 60px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-header h1 {
    color: var(--primary);
    font-size: 1.8rem;
}

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

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 0.9rem;
    color: #666;
}

/* Tool Page */
.tool-page {
    padding: 40px 20px;
    min-height: calc(100vh - 60px);
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

.tool-container h1 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.tool-container .desc {
    color: #666;
    margin-bottom: 30px;
}

.tool-box {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.tool-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.tool-box textarea,
.tool-box input[type="text"],
.tool-box input[type="number"] {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.tool-box textarea:focus,
.tool-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.output-box {
    background: #f5f5f5;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    min-height: 100px;
    white-space: pre-wrap;
    word-break: break-word;
}

.output-box.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Converter specific */
.converter-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.converter-row .btn {
    padding: 12px 16px;
}

/* Footer */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 40px 20px;
    text-align: center;
}

.footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

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

/* Messages */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .tools-grid { grid-template-columns: 1fr; }
    .converter-row { grid-template-columns: 1fr; }
    .nav-links { gap: 15px; }
    .nav-links .hide-mobile { display: none; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
}
