:root {
    --bg-main: #050505;
    --bg-surface: #0a0a0a;
    --bg-card: #111111;
    --accent: #00ff41;
    --accent-glow: rgba(0, 255, 65, 0.3);
    --accent-hover: #1eff5e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #949494;
    --border: #1a1a1a;
    --border-accent: #00ff41;
    --glass: rgba(10, 10, 10, 0.8);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

code,
.mono {
    font-family: 'IBM Plex Mono', monospace;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 50%);
    opacity: 0.2;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    letter-spacing: -2px;
}

.hero h1 span {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Terminal */
.terminal-window {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    margin: 0 auto;
}

.terminal-header {
    background: #111;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27ca3f;
}

.terminal-title {
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 24px;
    font-size: 0.95rem;
    line-height: 1.7;
    height: 300px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
}

.prompt {
    color: var(--accent);
}

/* Articles */
.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--border);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.05);
}

.article-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    filter: grayscale(0.5);
    transition: var(--transition);
}

.article-card:hover .article-img {
    filter: grayscale(0);
}

.article-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.article-title-card {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Footer */
.main-footer {
    padding: 80px 0 40px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 20px;
    color: var(--text-secondary);
    max-width: 320px;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 24px;
    font-size: 1rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Utilities */
.btn-primary {
    background: var(--accent);
    color: #000;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Tools Page */
.tools-page {
    padding: 140px 0 100px;
}

.tools-header {
    margin-bottom: 60px;
    text-align: center;
}

.tools-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.05);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 25px;
}

.tool-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.tool-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Tool View Page */
.tool-page {
    padding: 120px 0 80px;
    background: radial-gradient(circle at 50% 0%, rgba(0, 255, 65, 0.05) 0%, transparent 50%);
}

.tool-viewer-header {
    text-align: center;
    margin-bottom: 50px;
}

.tool-viewer-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tool-container-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

#tool-frame-container body {
    background: transparent !important;
    color: var(--text-primary) !important;
}

/* Generic Form Elements (for tools) */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px;
    border-radius: var(--radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

textarea.form-control {
    min-height: 120px;
    font-family: 'IBM Plex Mono', monospace;
}

/* Error/Success Messages */
.alert-error {
    color: #ff5f56;
    background: rgba(255, 95, 86, 0.1);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 95, 86, 0.2);
}

/* Article Page (baca.php) */
.article-page {
    padding: 120px 0 80px;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header-meta {
    margin-bottom: 40px;
    text-align: center;
}

.article-header-meta h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body h2 {
    color: var(--text-primary);
    margin: 50px 0 20px;
    font-family: 'IBM Plex Mono', monospace;
}

.article-body h3 {
    color: var(--accent);
    margin: 30px 0 15px;
}

.article-body p {
    margin-bottom: 25px;
}

.article-body img {
    border-radius: 12px;
    margin: 40px 0;
    border: 1px solid var(--border);
}

.article-body ul,
.article-body ol {
    margin: 0 0 30px 30px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 20px 30px;
    background: var(--bg-surface);
    font-style: italic;
    margin: 40px 0;
    border-radius: 0 12px 12px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    border: 1px solid var(--border);
}

.article-body th,
.article-body td {
    padding: 15px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-body th {
    background: var(--bg-surface);
    color: var(--accent);
}

/* Terminal box in content */
.terminal-box,
.terminal {
    background: #000 !important;
    border: 1px solid var(--border) !important;
    padding: 20px !important;
    border-radius: 8px !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.9rem !important;
    margin: 30px 0 !important;
    overflow-x: auto !important;
}

.info-box {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--accent);
    padding: 25px;
    border-radius: 12px;
    margin: 40px 0;
}

/* Form Extras */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 10px;
}

.form-check input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-check input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.form-check input[type="checkbox"]:checked::after {
    content: '\2713';
    color: #000;
    font-size: 14px;
    font-weight: bold;
}

.range-slider {
    width: 100%;
    height: 6px;
    background: var(--bg-surface);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Password Display Box */
.secure-display {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    color: var(--accent);
    background: #000;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 20px 0;
    word-break: break-all;
    text-align: center;
}

.strength-bar-container {
    height: 6px;
    background: var(--bg-surface);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.strength-bar-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
    background-color: #ff5f56;
}

/* Generic Card Panel for Tools */
.card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.card-panel-sm {
    padding: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.stat-value-lg {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1.2;
    margin: 10px 0;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-top: 5px;
}

.text-success {
    color: #00ff41 !important;
}

.text-danger {
    color: #ff5f56 !important;
}

.text-warning {
    color: #ffbd2e !important;
}

/* Checklist Styles */
.check-list {
    list-style: none;
    padding: 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.check-item i {
    font-size: 1.1rem;
}