/* ============================================
   KEYSHIELD - Custom Styles
   ============================================ */

:root {
    --primary: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #06b6d4;
    --accent: #10b981;
    --bg-dark: #0f172a;
    --bg-darker: #1a1a2e;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    overflow-x: hidden;
}

/* ============================================
   CUSTOM ANIMATIONS
   ============================================ */

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes float-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.8);
    }
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   NAVIGATION CUSTOMIZATION
   ============================================ */

nav {
    animation: slide-in 0.5s ease-out;
}

nav a {
    position: relative;
    overflow: hidden;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #06b6d4);
    transition: left 0.3s ease;
}

nav a:hover::after {
    left: 0;
}

/* ============================================
   TOOL CARD ANIMATIONS
   ============================================ */

.tool-card {
    animation: float-up 0.6s ease-out both;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }

.tool-card .overflow-hidden {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tool-card:hover .overflow-hidden {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.4);
}

/* ============================================
   INPUT & BUTTON STYLES
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background-color: rgba(30, 30, 50, 0.8) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    color: var(--text-light) !important;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: rgba(168, 85, 247, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1) !important;
    background-color: rgba(30, 30, 50, 0.95) !important;
}

textarea {
    resize: vertical;
    font-family: 'Space Mono', monospace;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
}

button:not(.no-style) {
    transition: all 0.3s ease;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gradient-border {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e, #2d2d4a) padding-box;
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, #a78bfa, #06b6d4) 1;
}

.code-block {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    overflow-x: auto;
    color: #10b981;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block::-webkit-scrollbar {
    height: 6px;
}

.code-block::-webkit-scrollbar-track {
    background: rgba(168, 85, 247, 0.1);
    border-radius: 10px;
}

.code-block::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.5);
    border-radius: 10px;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.8);
}

.btn-copy {
    position: relative;
    overflow: hidden;
}

.btn-copy::before {
    content: attr(data-clipboard-text);
    position: absolute;
    opacity: 0;
}

.success-message {
    animation: float-up 0.5s ease-out forwards;
}

/* ============================================
   SCROLL BAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a78bfa, #06b6d4);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c084fc, #06b6d4);
}

/* ============================================
   FORM VALIDATION
   ============================================ */

input:valid {
    border-color: rgba(16, 185, 129, 0.5) !important;
}

input:invalid {
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar {
    height: 6px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #06b6d4);
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================
   STRENGTH INDICATOR
   ============================================ */

.strength-meter {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.strength-weak { background: linear-gradient(90deg, #ef4444, #f87171); }
.strength-fair { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.strength-good { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.strength-strong { background: linear-gradient(90deg, #10b981, #34d399); }
.strength-very-strong { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* ============================================
   ALERT MESSAGES
   ============================================ */

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid;
    animation: float-up 0.4s ease-out;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.5);
    color: #86efac;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.5);
    color: #a5f3fc;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fcd34d;
}

/* ============================================
   DARK MODE SPECIFICS (Already on dark mode)
   ============================================ */

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    background-attachment: fixed;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.875rem !important;
    }

    .tool-card {
        animation: float-up 0.4s ease-out;
    }

    nav .hidden {
        display: none;
    }
}

@media (max-width: 480px) {
    .code-block {
        font-size: 0.8rem;
        padding: 10px;
    }

    button {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    nav,
    footer,
    .no-print {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: blue;
    }
}

