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

body {
    font-family: system-ui, sans-serif;
    background: #f4f7f9;
    color: #1f2937;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #0f172a;
    color: #fff;
    padding: 24px;
    position: fixed;
    top: 0;
    bottom: 0;
}

.sidebar ul {
    list-style: none;   /* removes dots */
    padding: 0;
    margin: 0;
}

.sidebar h2 {
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    padding: 10px 14px;
    color: #cbd5f5;
    text-decoration: none;
    border-radius: 10px;
}

.sidebar a.active,
.sidebar a:hover {
    background: #1e293b;
    color: #fff;
}

/* Main */
.main-content {
    margin-left: 240px;
    padding: 40px;
    width: 100%;
}

header {
    max-width: 900px;
    margin: 0 auto 30px;
}

header h1 {
    font-size: 2.2rem;
}

header p {
    color: #4b5563;
}

/* Tool Card */
.tool-card {
    max-width: 900px;
    margin: 0 auto 20px;
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

textarea {
    width: 100%;
    min-height: 140px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    margin-bottom: 14px;
}

button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #1d4ed8;
}

/* Output */
.output-wrapper {
    position: relative;
    margin-top: 18px;
}

.output {
    background: #f1f5f9;
    padding: 14px;
    border-radius: 12px;
    font-family: monospace;
    word-break: break-all;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e5e7eb;
    color: #111;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* SEO */
.tool-content {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.tool-content h2 {
    margin: 30px 0 14px;
}

.tool-content p,
.tool-content li {
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111827;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
}

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

/* ===== JWT TOOL ===== */

.jwt-tool textarea {
    min-height: 120px;
    font-family: monospace;
}

/* Status badge */
.jwt-status {
    margin-top: 12px;
    font-weight: 600;
}

.jwt-status.valid {
    color: #16a34a;
}

.jwt-status.expired {
    color: #dc2626;
}

.jwt-status.invalid {
    color: #ca8a04;
}

/* Output layout */
.jwt-output {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.jwt-section {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px;
}

.jwt-section h3 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.jwt-section pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 14px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 900px) {
    .jwt-output {
        grid-template-columns: 1fr;
    }
}

/* ===== ASPECT RATIO CALCULATOR ===== */

.aspect-ratio-tool .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.aspect-ratio-tool label {
    display: block;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 6px;
}

.aspect-ratio-tool input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.aspect-ratio-tool input::placeholder {
    color: #9ca3af;
}

/* Controls row */

.aspect-ratio-controls {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.aspect-ratio-controls select {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #fff;
    font-size: 0.9rem;
}

/* Result */

.aspect-ratio-result {
    margin-top: 18px;
    padding: 14px;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 1rem;
}

.aspect-ratio-result strong {
    font-weight: 600;
}

/* Visual Preview */

.aspect-ratio-preview {
    margin-top: 24px;
    background: repeating-linear-gradient(
        45deg,
        #e5e7eb,
        #e5e7eb 10px,
        #f8fafc 10px,
        #f8fafc 20px
    );
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    font-size: 0.85rem;
    overflow: hidden;
}

.aspect-ratio-preview span {
    padding: 8px 12px;
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
}

/* SEO Content */

.aspect-ratio-content h2 {
    margin: 28px 0 12px;
}

.aspect-ratio-content pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* Mobile */

@media (max-width: 900px) {
    .aspect-ratio-tool .grid {
        grid-template-columns: 1fr;
    }

    .aspect-ratio-controls {
        flex-direction: column;
    }
}

.tools-row {
    max-width: 900px;
    margin: 0 auto 20px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.tools-row .tool-card {
    flex: 1 1 280px;
}


@media (max-width: 700px) {
    .timezone-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .timezone-label {
        width: 100%;
    }
}

.timezone-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.timezone-label {
    width: 240px;
    font-size: 0.9rem;
    font-weight: 500;
}

.timezone-row input {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    width: 140px;
}

.timezone-meta {
    font-size: 0.75rem;
    color: #6b7280;
    min-width: 120px;
}

/* ===== SEARCHABLE TIMEZONE DROPDOWN ===== */

.timezone-search-wrapper {
    position: relative;
    width: 100%;
}

.timezone-search-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.timezone-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.timezone-select {
    display: none;
}

.timezone-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
    margin-top: 4px;
}

.timezone-country-group {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.timezone-country-group:last-child {
    border-bottom: none;
}

.timezone-country-header {
    padding: 8px 14px;
    font-weight: 600;
    color: #2563eb;
    font-size: 0.85rem;
    text-transform: uppercase;
    background: #f8fafc;
    sticky: 0;
}

.timezone-option {
    padding: 10px 14px;
    cursor: pointer;
    color: #374151;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.timezone-option:hover {
    background: #eff6ff;
    color: #1e40af;
}

.timezone-no-results {
    padding: 20px 14px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.selected-timezone {
    margin-top: 8px;
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 500;
}

/* Unix Timestamp Tool */
.timestamp-tool .grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.timestamp-tool label {
    display: block;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 6px;
    font-weight: 500;
}

.timestamp-tool input[type="number"],
.timestamp-tool input[readonly] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.timestamp-tool input[readonly] {
    background: #f9fafb;
    color: #6b7280;
}

.timestamp-tool input::placeholder {
    color: #9ca3af;
}

/* Controls row */
.timestamp-controls {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.timestamp-controls button {
    flex: 1;
}

/* SEO Content specific to timestamp tool */
.timestamp-content h2 {
    margin: 28px 0 12px;
}

.timestamp-content p,
.timestamp-content li {
    line-height: 1.7;
    margin-bottom: 10px;
}

.timestamp-content strong {
    font-weight: 600;
}

.timestamp-content ol,
.timestamp-content ul {
    margin-left: 20px;
}

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

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 16px;
    }

    .sidebar ul {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .sidebar a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .timestamp-tool .grid {
        grid-template-columns: 1fr;
    }

    .timezone-dropdown {
        max-height: 300px;
    }

    .timestamp-controls {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .tool-card {
        padding: 20px;
    }
}

/* Scrollbar styling for timezone dropdown */
.timezone-dropdown::-webkit-scrollbar {
    width: 8px;
}

.timezone-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.timezone-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.timezone-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
