/* Dev Tools - Main Stylesheet */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

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

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

/* Header & Navigation */
.header {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.2s;
}

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

.nav-link .arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-item:hover .arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    padding: 0.5rem;
    z-index: 1000;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color 0.15s;
}

.dropdown a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.lang-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
}

.lang-dropdown button:hover {
    background-color: var(--bg-color);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Ad Placeholder */
.ad-container {
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0;
    min-height: 0;
}

/* Hide Advertisement text - only show when ads are loaded */
.ad-container > span {
    display: none;
}

/* When ads load, they will fill these containers naturally */
.ad-container.leaderboard {
    min-height: 0;
}

.ad-container.rectangle {
    min-height: 0;
    max-width: 336px;
}

.ad-container.sidebar {
    min-height: 0;
    width: 300px;
}

/* Tool Card */
.tool-container {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.tool-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.tool-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

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

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Result Display */
.result-container {
    background: #1e293b;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.result-container pre {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-title {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.copy-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #475569;
}

/* Timestamp Display */
.timestamp-display {
    text-align: center;
    padding: 2rem;
}

.timestamp-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Monaco', 'Menlo', monospace;
}

.timestamp-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grid Layouts */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tool-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tool-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Layout with Sidebar */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.page-main {
    min-width: 0;
}

.page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Related Tools */
.related-tools {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.related-tools h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.related-tools a {
    display: block;
    padding: 0.5rem 0;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.related-tools a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .page-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ad-container.sidebar {
        width: 100%;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .timestamp-value {
        font-size: 2.5rem;
    }

    .tool-container {
        padding: 1.5rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Two Column Input */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

/* Status Messages */
.status-success {
    color: var(--success-color);
    font-weight: 500;
}

.status-error {
    color: var(--error-color);
    font-weight: 500;
}

/* Tab Navigation */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
