/**
 * PQCrypta KeyVault - Technical Report Styles
 * Modern CSS with 3D Animations
 * CSP-Compliant: No inline styles required
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary-color: #00d4ff;
    --secondary-color: #7b2ff7;
    --accent-color: #ff2e97;
    --success-color: #00ff88;
    --warning-color: #ffa500;
    --danger-color: #ff4444;

    /* Backgrounds */
    --bg-dark: #0a0e27;
    --bg-darker: #050812;
    --bg-card: rgba(20, 25, 45, 0.8);
    --bg-card-hover: rgba(30, 35, 55, 0.9);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b8c5db;
    --text-muted: #6b7a99;

    /* Borders */
    --border-color: rgba(0, 212, 255, 0.2);
    --border-glow: rgba(0, 212, 255, 0.4);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-indexes */
    --z-background: -1;
    --z-content: 1;
    --z-header: 100;
    --z-overlay: 1000;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body.key-vault-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== 3D Background Animation ===== */
.vault-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.vault-cube-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    perspective: 2000px;
    width: 400px;
    height: 400px;
    display: none; /* Hidden - interferes with page view */
}

.vault-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 30s infinite linear;
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

.cube-face {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg,
        rgba(0, 212, 255, 0.08) 0%,
        rgba(123, 47, 247, 0.08) 100%);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.cube-front {
    transform: rotateY(0deg) translateZ(200px);
}

.cube-back {
    transform: rotateY(180deg) translateZ(200px);
}

.cube-left {
    transform: rotateY(-90deg) translateZ(200px);
}

.cube-right {
    transform: rotateY(90deg) translateZ(200px);
}

.cube-top {
    transform: rotateX(90deg) translateZ(200px);
}

.cube-bottom {
    transform: rotateX(-90deg) translateZ(200px);
}

/* Cube Content Styles */
.cube-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    padding: var(--spacing-md);
    background: rgba(10, 14, 39, 0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glow);
}

.cube-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 0 15px var(--primary-color));
    animation: floatIcon 3s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cube-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cube-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Particle Field */
.particle-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: floatParticle 20s infinite ease-in-out;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translate(var(--tx), var(--ty));
    }
}

/* ===== Header ===== */
.vault-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vault-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-lock {
    width: 40px;
    height: 40px;
    position: relative;
    animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.lock-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.lock-shackle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.vault-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vault-nav {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 5px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::before {
    transform: translateX(0);
}

/* ===== Main Content ===== */
.vault-main {
    position: relative;
    z-index: var(--z-content);
}

/* ===== Hero Section ===== */
.vault-hero {
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--secondary-color) 50%,
        var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s infinite ease-in-out;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(0, 212, 255, 0.1) 0%,
        rgba(123, 47, 247, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: rotateIcon 10s infinite linear;
}

@keyframes rotateIcon {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.stat-icon-keys {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.stat-icon-storage {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 0 30px rgba(123, 47, 247, 0.5);
}

.stat-icon-speed {
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.stat-icon-compression {
    background: linear-gradient(135deg, var(--warning-color), var(--accent-color));
    box-shadow: 0 0 30px rgba(255, 165, 0, 0.5);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Section Styles ===== */
.vault-section {
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Overview Section ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.overview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(0, 212, 255, 0.1),
        transparent 30%
    );
    animation: rotateGradient 6s linear infinite;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

.overview-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
}

.overview-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.principle-list {
    list-style: none;
    position: relative;
    z-index: 1;
}

.principle-list li {
    padding: var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
}

.principle-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px var(--primary-color));
}

.stack-layers {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.stack-layer {
    padding: var(--spacing-sm);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
}

.layer-rust {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.05));
    border-left: 3px solid var(--primary-color);
}

.layer-postgres {
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.2), rgba(123, 47, 247, 0.05));
    border-left: 3px solid var(--secondary-color);
}

.layer-security {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.05));
    border-left: 3px solid var(--success-color);
}

.stack-layer:hover {
    transform: translateX(10px);
}

.layer-label {
    font-weight: 600;
    color: var(--text-primary);
}

.layer-tech {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.feature-item {
    padding: var(--spacing-sm);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.feature-item:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* ===== Architecture Section ===== */
.architecture-diagram {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    align-items: center;
}

.arch-layer {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-sm);
    transition: all var(--transition-normal);
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.arch-layer:hover {
    border-color: var(--border-glow);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.2);
    transform: translateY(-5px);
}

.arch-layer h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    text-align: center;
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
}

.arch-components {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.arch-component {
    padding: 6px 10px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arch-component:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
}

.arch-arrow {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.arch-arrow::before {
    content: '→';
    font-size: 2.5rem;
    color: var(--primary-color);
    animation: slideArrow 1.5s infinite ease-in-out !important;
    -webkit-animation: slideArrow 1.5s infinite ease-in-out !important;
    text-shadow: 0 0 20px var(--primary-color),
                 0 0 40px rgba(0, 212, 255, 0.6),
                 0 0 60px rgba(0, 212, 255, 0.3);
}

@keyframes slideArrow {
    0% {
        transform: translateX(-10px);
        opacity: 0.3;
    }
    50% {
        transform: translateX(15px);
        opacity: 1;
    }
    100% {
        transform: translateX(-10px);
        opacity: 0.3;
    }
}

@-webkit-keyframes slideArrow {
    0% {
        -webkit-transform: translateX(-10px);
        opacity: 0.3;
    }
    50% {
        -webkit-transform: translateX(15px);
        opacity: 1;
    }
    100% {
        -webkit-transform: translateX(-10px);
        opacity: 0.3;
    }
}

.schema-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--spacing-sm);
}

.schema-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
}

.schema-group:hover {
    border-color: var(--border-glow);
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-2px);
}

.schema-group h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-weight: 700;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.schema-table-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    margin-bottom: 6px;
    display: block;
    font-style: italic;
}

.schema-group code {
    display: block;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--primary-color);
    margin: 1px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--success-color);
    overflow-x: auto;
    white-space: nowrap;
}

/* ===== Performance Section ===== */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-md);
}

.perf-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
}

.perf-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.2);
}

.perf-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.perf-metric {
    margin-bottom: var(--spacing-md);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.metric-bar {
    height: 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
    overflow: hidden;
}

.metric-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.metric-fill-success {
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
}

.metric-fill-warning {
    background: linear-gradient(90deg, var(--warning-color), var(--accent-color));
}

.perf-table {
    width: 100%;
    border-collapse: collapse;
}

.perf-table thead th {
    padding: var(--spacing-sm);
    text-align: left;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

.perf-table tbody td {
    padding: var(--spacing-sm);
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.perf-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-excellent {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.comparison-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.comparison-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--spacing-sm);
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.comparison-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-before,
.comparison-after {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comparison-before {
    color: var(--text-muted);
}

.comparison-before::after {
    content: ' ⬇';
    color: var(--primary-color);
    font-size: 1.3rem;
    display: inline-block;
    margin-left: 8px;
    animation: bounceDownArrow 1.8s infinite ease-in-out !important;
    -webkit-animation: bounceDownArrow 1.8s infinite ease-in-out !important;
    text-shadow: 0 0 15px var(--primary-color),
                 0 0 30px rgba(0, 212, 255, 0.6);
}

@keyframes bounceDownArrow {
    0% {
        transform: translateY(-6px);
        opacity: 0.4;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
    100% {
        transform: translateY(-6px);
        opacity: 0.4;
    }
}

@-webkit-keyframes bounceDownArrow {
    0% {
        -webkit-transform: translateY(-6px);
        opacity: 0.4;
    }
    50% {
        -webkit-transform: translateY(10px);
        opacity: 1;
    }
    100% {
        -webkit-transform: translateY(-6px);
        opacity: 0.4;
    }
}

.comparison-arrow {
    display: none;
}

.comparison-after {
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-gain {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.comparison-gain::before {
    content: '✓ ';
    display: inline-block;
    margin-right: 4px;
    animation: pulseCheckmark 2s infinite ease-in-out !important;
    -webkit-animation: pulseCheckmark 2s infinite ease-in-out !important;
    text-shadow: 0 0 20px var(--success-color),
                 0 0 40px rgba(0, 255, 136, 0.5);
}

@keyframes pulseCheckmark {
    0% {
        transform: scale(0.9) rotate(-5deg);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.6) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.9) rotate(-5deg);
        opacity: 0.5;
    }
}

@-webkit-keyframes pulseCheckmark {
    0% {
        -webkit-transform: scale(0.9) rotate(-5deg);
        opacity: 0.5;
    }
    50% {
        -webkit-transform: scale(1.6) rotate(5deg);
        opacity: 1;
    }
    100% {
        -webkit-transform: scale(0.9) rotate(-5deg);
        opacity: 0.5;
    }
}

/* ===== Security Section ===== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.security-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
}

.security-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.2);
    transform: translateY(-5px);
}

.security-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.security-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: ripple 2s infinite ease-out;
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(0, 212, 255, 0);
    }
}

.security-icon-access {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.security-icon-audit {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.security-icon-lifecycle {
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
}

.security-icon-shredding {
    background: linear-gradient(135deg, var(--warning-color), var(--danger-color));
}

.security-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.security-list {
    list-style: none;
}

.security-list li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: var(--spacing-md);
}

.security-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
}

.compliance-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.badge {
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    min-width: 150px;
    transition: all var(--transition-normal);
}

.badge:hover {
    border-color: var(--border-glow);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
}

.badge-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.badge-text {
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

/* ===== API Section ===== */
.api-workflow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.workflow-step {
    flex: 1;
    min-width: 250px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-md);
    position: relative;
    transition: all var(--transition-normal);
}

.workflow-step:hover {
    border-color: var(--border-glow);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.2);
    transform: scale(1.05);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

.workflow-step h3 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--success-color);
    line-height: 1.5;
}

.step-result {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.result-key {
    color: var(--primary-color);
}

.result-arrow {
    color: var(--primary-color);
    font-size: 1.2rem;
    display: inline-block;
    animation: pulseArrow 1.8s infinite ease-in-out !important;
    -webkit-animation: pulseArrow 1.8s infinite ease-in-out !important;
    text-shadow: 0 0 15px var(--primary-color),
                 0 0 30px rgba(0, 212, 255, 0.5);
    margin: 0 8px;
}

@keyframes pulseArrow {
    0% {
        transform: scale(0.8);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.4;
    }
}

@-webkit-keyframes pulseArrow {
    0% {
        -webkit-transform: scale(0.8);
        opacity: 0.4;
    }
    50% {
        -webkit-transform: scale(1.5);
        opacity: 1;
    }
    100% {
        -webkit-transform: scale(0.8);
        opacity: 0.4;
    }
}

.result-value {
    color: var(--text-secondary);
}

.workflow-arrow {
    font-size: 2.5rem;
    color: var(--primary-color);
    animation: slideArrowHorizontal 1.5s infinite ease-in-out !important;
    -webkit-animation: slideArrowHorizontal 1.5s infinite ease-in-out !important;
    text-shadow: 0 0 20px var(--primary-color),
                 0 0 40px rgba(0, 212, 255, 0.5);
    display: inline-block;
}

@keyframes slideArrowHorizontal {
    0% {
        transform: translateX(-12px);
        opacity: 0.3;
    }
    50% {
        transform: translateX(18px);
        opacity: 1;
    }
    100% {
        transform: translateX(-12px);
        opacity: 0.3;
    }
}

@-webkit-keyframes slideArrowHorizontal {
    0% {
        -webkit-transform: translateX(-12px);
        opacity: 0.3;
    }
    50% {
        -webkit-transform: translateX(18px);
        opacity: 1;
    }
    100% {
        -webkit-transform: translateX(-12px);
        opacity: 0.3;
    }
}

.api-specs {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-md);
}

.api-specs h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.specs-category {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: var(--spacing-sm);
    transition: all var(--transition-normal);
}

.specs-category:hover {
    border-color: var(--border-glow);
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-2px);
}

.specs-category h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tbody tr {
    border-bottom: 1px solid rgba(0, 212, 255, 0.05);
}

.specs-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.08);
}

.spec-label {
    padding: 6px 8px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 45%;
    font-size: 0.85rem;
}

.spec-value {
    padding: 6px 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===== Status Section ===== */
.status-dashboard {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: var(--spacing-xl);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-loading {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.status-item {
    padding: var(--spacing-md);
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all var(--transition-normal);
}

.status-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.05);
}

.status-item-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.status-item-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-item-healthy {
    border-left: 3px solid var(--success-color);
}

.status-item-warning {
    border-left: 3px solid var(--warning-color);
}

.status-item-error {
    border-left: 3px solid var(--danger-color);
}

/* ===== Footer ===== */
.vault-footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.footer-section p {
    color: var(--text-secondary);
}

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

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

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

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

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

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .architecture-diagram {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .arch-arrow {
        width: 100%;
        height: 40px;
    }

    .arch-arrow::before {
        content: '↓';
        animation: bounceArrowVertical 1.5s infinite ease-in-out !important;
        -webkit-animation: bounceArrowVertical 1.5s infinite ease-in-out !important;
    }

    @keyframes bounceArrowVertical {
        0% {
            transform: translateY(-8px);
            opacity: 0.3;
        }
        50% {
            transform: translateY(15px);
            opacity: 1;
        }
        100% {
            transform: translateY(-8px);
            opacity: 0.3;
        }
    }

    @-webkit-keyframes bounceArrowVertical {
        0% {
            -webkit-transform: translateY(-8px);
            opacity: 0.3;
        }
        50% {
            -webkit-transform: translateY(15px);
            opacity: 1;
        }
        100% {
            -webkit-transform: translateY(-8px);
            opacity: 0.3;
        }
    }
}

@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .schema-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .vault-cube-container {
        width: 300px;
        height: 300px;
    }

    .cube-face {
        width: 300px;
        height: 300px;
    }

    .cube-front { transform: rotateY(0deg) translateZ(150px); }
    .cube-back { transform: rotateY(180deg) translateZ(150px); }
    .cube-left { transform: rotateY(-90deg) translateZ(150px); }
    .cube-right { transform: rotateY(90deg) translateZ(150px); }
    .cube-top { transform: rotateX(90deg) translateZ(150px); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(150px); }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .vault-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .api-workflow {
        flex-direction: column;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .overview-grid,
    .performance-grid,
    .specs-grid {
        grid-template-columns: 1fr;
    }

    .schema-info {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .vault-cube-container {
        width: 200px;
        height: 200px;
    }

    .cube-face {
        width: 200px;
        height: 200px;
    }

    .cube-front { transform: rotateY(0deg) translateZ(100px); }
    .cube-back { transform: rotateY(180deg) translateZ(100px); }
    .cube-left { transform: rotateY(-90deg) translateZ(100px); }
    .cube-right { transform: rotateY(90deg) translateZ(100px); }
    .cube-top { transform: rotateX(90deg) translateZ(100px); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(100px); }
}

/* ===== Accessibility ===== */
/* Animations always enabled - removed prefers-reduced-motion override */

/* ===== Print Styles ===== */
@media print {
    .vault-background,
    .vault-header,
    .vault-footer {
        display: none;
    }

    .vault-section {
        page-break-inside: avoid;
    }
}
