/* ComplianceCompass Styles */

:root {
    --bg-dark: #0a0e1a;
    --bg-surface: #111827;
    --bg-elevated: #1a2332;
    --accent-primary: #00d4ff;
    --accent-secondary: #7CC243;
    --accent-warning: #fbbf24;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --shadow-glow: rgba(0, 212, 255, 0.2);
}

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

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

/* Animated background grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    padding: 1.5rem 0;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-text {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

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

.btn-github {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-github:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-glow);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px var(--shadow-glow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

/* Standards Overview */
.standards-overview {
    padding: 5rem 0;
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.5));
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.standard-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.standard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.standard-card:hover::before {
    transform: scaleX(1);
}

.standard-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 32px var(--shadow-glow);
}

.standard-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.standard-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.standard-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.standard-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 20px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Explorer Section */
.explorer {
    padding: 5rem 0;
    min-height: 100vh;
}

.search-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-bar svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

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

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

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

.results-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.results-count span {
    color: var(--accent-primary);
    font-weight: 700;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--accent-secondary);
    border-radius: 8px;
    color: var(--accent-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: var(--accent-secondary);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

.results-container {
    display: grid;
    gap: 1.5rem;
}

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.control-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.control-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px var(--shadow-glow);
}

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

.control-id {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.control-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-owasp {
    background: rgba(124, 194, 67, 0.2);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
}

.badge-iso {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-warning);
    border: 1px solid var(--accent-warning);
}

.badge-nist {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.control-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.control-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.control-mappings {
    display: grid;
    gap: 0.75rem;
}

.mapping-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 8px;
}

.mapping-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 100px;
}

.mapping-value {
    font-family: 'Space Mono', monospace;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* API Section */
.api-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.5));
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.api-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.api-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px var(--shadow-glow);
}

.api-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.api-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.api-card pre {
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.api-card code {
    font-family: 'Space Mono', monospace;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.api-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.api-link:hover {
    gap: 0.75rem;
}

/* About Section */
.about {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.about-text a:hover {
    text-decoration: underline;
}

.feature-list {
    list-style: none;
    margin: 2rem 0;
}

.feature-list li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.about-visual {
    position: relative;
}

.mapping-diagram {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
}

.mapping-node {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid;
    animation: pulse 3s ease-in-out infinite;
}

.owasp-node {
    top: 10%;
    left: 10%;
    background: rgba(124, 194, 67, 0.1);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.iso-node {
    top: 10%;
    right: 10%;
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--accent-warning);
    color: var(--accent-warning);
}

.nist-node {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.mapping-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mapping-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-dark);
    font-size: 1.1rem;
    z-index: 10;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    margin-top: 5rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

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

.footer-license {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
    }
}
