@tailwind base;
@tailwind components;
@tailwind utilities;

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Permanent+Marker&family=Cairo:wght@400;700;900&display=swap');

:root {
    --p5-red: #D62323;
    --p5-black: #0a0a0a;
    --p5-dark-gray: #1f1f1f;
    --p5-white: #F0F0F0;
    --p5-yellow: #FCE205;
    --p5-blue: #0022aa;
    /* Velvet room vibe */
}

body {
    background-color: var(--p5-black);
    color: var(--p5-white);
    font-family: 'Cairo', 'Anton', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Pattern - Subtle Dark Starfield/Halftone */
.bg-p5-pattern {
    background-image:
        radial-gradient(circle at 50% 50%, #1a1a1a 1px, transparent 1px),
        radial-gradient(circle at 0% 0%, #2a2a2a 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    position: fixed;
    inset: 0;
    z-index: -1;
}

.bg-slash-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    background: linear-gradient(120deg, transparent 40%, rgba(214, 35, 35, 0.05) 40.1%, rgba(214, 35, 35, 0.05) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Typography & Menu */
.p5-menu-text {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.p5-menu-text:hover {
    transform: skewX(-10deg) translateX(10px);
    color: var(--p5-red);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.1);
}

.p5-menu-active {
    color: var(--p5-red);
    transform: skewX(-10deg);
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.p5-menu-active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--p5-white);
    transform: skewX(20deg);
}


/* Box Styles - Dark Theme */
.p5-box {
    background: var(--p5-dark-gray);
    color: white;
    transform: skew(-2deg);
    border: 1px solid #333;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.8);
    transition: transform 0.2s;
}

.p5-box:hover {
    transform: skew(-2deg) translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--p5-red);
    border-color: var(--p5-red);
}

.p5-box-highlight {
    background: var(--p5-white);
    color: black;
    transform: skew(-2deg);
    border: 2px solid var(--p5-red);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}

/* Card Styles */
.p5-persona-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: white;
    border: 1px solid #333;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: all 0.2s ease-out;
    position: relative;
    overflow: hidden;
}

.p5-persona-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--p5-red);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.2s;
}

.p5-persona-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(214, 35, 35, 0.2);
    border-color: var(--p5-red);
}

.p5-persona-card:hover::before {
    transform: scaleY(1);
}

/* Inputs */
.p5-input-field {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: 'Anton', sans-serif;
    font-size: 1.2rem;
    border: 1px solid #333;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.3s;
}

.p5-input-field::placeholder {
    color: #555;
}

.p5-input-field:focus {
    outline: none;
    background: black;
    border-color: var(--p5-red);
    box-shadow: 0 0 15px rgba(214, 35, 35, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--p5-red);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

/* Stats Bar */
.stat-bar-outer {
    background: #333;
    height: 8px;
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar-inner {
    background: var(--p5-yellow);
    height: 100%;
    box-shadow: 0 0 5px var(--p5-yellow);
}

/* Affinity Grid */
.affinity-box {
    border: 1px solid #333;
    background: rgba(255, 255, 255, 0.03);
    color: white;
    text-align: center;
    border-radius: 4px;
    overflow: hidden;
}

.affinity-header {
    background: #333;
    color: #aaa;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 0;
}