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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --border-color: #2a2a3a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, var(--accent-glow) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-creator {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

/* Hero Visual - Mesh Network Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.5s ease-out;
}

.mesh-network-animation {
    position: relative;
    width: 400px;
    height: 400px;
}

.node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-primary), 0 0 40px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}

.node:nth-child(1) {
    top: 50%;
    left: 50%;
    animation-delay: 0s;
}

.node:nth-child(2) {
    top: 20%;
    left: 30%;
    animation-delay: 0.4s;
}

.node:nth-child(3) {
    top: 30%;
    left: 70%;
    animation-delay: 0.8s;
}

.node:nth-child(4) {
    top: 70%;
    left: 25%;
    animation-delay: 1.2s;
}

.node:nth-child(5) {
    top: 75%;
    left: 65%;
    animation-delay: 1.6s;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

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

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

/* Architecture Section */
.architecture {
    background-color: var(--bg-secondary);
}

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

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

.architecture-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.architecture-card.mode-1::before {
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.architecture-card.mode-2::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.architecture-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.card-icon {
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.architecture-card.mode-1 .card-icon {
    color: #3b82f6;
}

.architecture-card.mode-2 .card-icon {
    color: #10b981;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    padding: 0.75rem 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.architecture-card.mode-1 .feature-list li::before {
    color: #3b82f6;
}

.architecture-card.mode-2 .feature-list li::before {
    color: #10b981;
}

.mode-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.architecture-card.mode-1 .mode-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.architecture-card.mode-2 .mode-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Permissions Section */
.permissions {
    background-color: var(--bg-primary);
}

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

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

.permission-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.permission-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.permission-icon.bluetooth {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

.permission-icon.location {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.permission-icon.background {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.permission-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.permission-description {
    color: var(--text-muted);
    line-height: 1.7;
}

/* IP Section */
.ip-section {
    background-color: var(--bg-secondary);
}

.ip-card {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ip-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.ip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--accent-glow);
    border-radius: 20px;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

.ip-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.ip-content {
    position: relative;
    z-index: 1;
}

.ip-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ip-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.ip-badge {
    padding: 0.5rem 1.5rem;
    background: var(--accent-glow);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.footer-text:last-of-type {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .mesh-network-animation {
        width: 300px;
        height: 300px;
    }

    .architecture-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

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

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

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

    .architecture-card,
    .permission-card,
    .ip-card {
        padding: 1.5rem;
    }

    .ip-title {
        font-size: 1.5rem;
    }

    .mesh-network-animation {
        width: 250px;
        height: 250px;
    }

    .node {
        width: 15px;
        height: 15px;
    }
}
