/* DevTools Site - Common Styles */
/* iOS-style design system, shared across all tools */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

:root {
    /* iOS System Colors */
    --ios-blue: #007aff;
    --ios-green: #34c759;
    --ios-orange: #ff9f0a;
    --ios-red: #ff3b30;
    --ios-purple: #af52de;
    --ios-pink: #ff2d55;
    --ios-teal: #5ac8fa;
    --ios-gray: #8e8e93;
    
    /* Backgrounds */
    --bg-primary: linear-gradient(145deg, #e8edf5 0%, #dde4f0 50%, #e4e8f5 100%);
    --bg-card: rgba(255,255,255,0.82);
    --bg-input: rgba(118,118,128,0.06);
    
    /* Text */
    --text-primary: #1c1c1e;
    --text-secondary: #6e6e73;
    --text-tertiary: #aeaeb2;
    
    /* Border */
    --border-light: rgba(0,0,0,0.08);
    --border-focus: var(--ios-blue);
    
    /* Shadow */
    --shadow-card: 0 2px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-dropdown: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

body {
    font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

/* ─── Navbar ───────────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.navbar-logo {
    font-size: 22px;
}

.navbar-title {
    font-size: 17px;
    font-weight: 600;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--ios-blue);
}

/* ─── Main Content ───────────────────────────────────── */
.main {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ─── Cards ──────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: var(--shadow-card);
}

.card-header {
    padding: 16px 20px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 12px 20px 20px;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--ios-blue);
    color: #fff;
}

.btn-primary:hover {
    background: #0066d6;
}

.btn-danger {
    background: var(--ios-red);
    color: #fff;
}

.btn-danger:hover {
    background: #d63029;
}

.btn-ghost {
    background: rgba(118,118,128,0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: rgba(118,118,128,0.16);
}

.btn-sm {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 10px;
}

/* ─── Forms ──────────────────────────────────────────── */
.input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.input::placeholder {
    color: var(--text-tertiary);
}

.input:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

.textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* ─── Toggle (iOS Style) ─────────────────────────────── */
.ios-toggle {
    position: relative;
    width: 44px;
    height: 26px;
    cursor: pointer;
}

.ios-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-toggle-track {
    position: absolute;
    inset: 0;
    background: #e5e5ea;
    border-radius: 13px;
    transition: background 0.25s;
}

.ios-toggle input:checked + .ios-toggle-track {
    background: var(--ios-green);
}

.ios-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.25s;
}

.ios-toggle input:checked ~ .ios-toggle-thumb {
    transform: translateX(18px);
}

/* ─── Tool Grid (Homepage) ───────────────────────────── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

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

.tool-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.tool-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
    background: rgba(255,255,255,0.5);
    border-top: 1px solid var(--border-light);
    padding: 20px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ─── Ad Slots ───────────────────────────────────────── */
.ad-slot {
    background: rgba(118,118,128,0.06);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
    margin: 16px 0;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 720px) {
    .navbar {
        padding: 0 16px;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .main {
        padding: 16px;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
}
