/* ===================================
   Password Vault Website Styles
   =================================== */

/* ===== Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-code: #f1f5f9;

    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    --container-width: 1200px;
    --border-radius: 8px;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Courier New", Courier, monospace;
}

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

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    margin: 1.5rem 0 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Header ===== */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.site-title:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.site-title .icon {
    height: 2rem;
    width: auto;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.version {
    font-size: 0.875rem;
    color: var(--text-light);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ===== Navigation ===== */
.main-nav {
    position: relative;
}

.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.25rem;
}

.menu-icon span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    text-decoration: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .menu-icon {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .menu-toggle:checked ~ .nav-menu {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 0.5rem 1rem;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-rating {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--bg-secondary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ===== Content ===== */
main {
    min-height: calc(100vh - 400px);
    padding: 3rem 0;
}

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

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.content-header h1 {
    margin: 0 0 0.5rem 0;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.content-body {
    line-height: 1.8;
}

.content-body h2 {
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.content-body h3 {
    margin-top: 2rem;
}

/* Homepage specific */
.homepage .content-body h2:first-of-type {
    margin-top: 0;
}

/* ===== Code Blocks ===== */
code {
    background: var(--bg-code);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875em;
}

pre {
    background: var(--bg-code);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

pre code {
    background: none;
    padding: 0;
}

/* ===== Lists ===== */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
}

tr:hover {
    background: var(--bg-secondary);
}

/* ===== Blockquotes ===== */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== Horizontal Rule ===== */
hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

.security-badge {
    background: var(--success-color);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: var(--text-secondary);
}

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

/* ===== Page List ===== */
.page-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.page-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.page-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.page-item h3 {
    margin: 0 0 0.5rem 0;
}

.page-item p {
    margin: 0;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 2rem 0;
    }

    main {
        padding: 1.5rem 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===== Utilities ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
