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

:root {
    --primary-color: #00d4ff;
    --secondary-color: #8b5cf6;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --bg-dark: #0a0e27;
    --bg-darker: #050814;
    --dark-bg: rgba(10, 14, 39, 0.8);
    --darker-bg: rgba(15, 22, 41, 0.9);
    --light-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(0, 212, 255, 0.3);
    --card-border: rgba(102, 126, 234, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --hover-bg: rgba(102, 126, 234, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(102, 126, 234, 0.5);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --transition-smooth: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body), 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1629 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* =================================================================
   NAVIGATION BAR
   ================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 8, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(5, 8, 20, 0.98);
    box-shadow: 0 4px 30px rgba(0, 212, 255, 0.1);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.logo-link:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.logo-image {
    height: 70px;
    width: auto;
    display: block;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(126, 34, 206, 0.4));
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

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

.nav-link.active::after {
    width: 100% !important;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    margin: 4px 0;
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Animated Background Elements */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0e27 0%, #050814 50%, #1a0933 100%);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

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

.planets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.planet {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.6;
    background: radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.4) 50%, rgba(102, 126, 234, 0.2) 100%);
}

@keyframes planetFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-15px, -20px) scale(0.95); }
    75% { transform: translate(10px, 15px) scale(1.02); }
}

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

.meteor {
    position: fixed;
    width: 2px;
    height: 100px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 50%, transparent 100%);
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.8), 0 0 20px rgba(118, 75, 162, 0.6);
}

@keyframes meteorFall {
    0% {
        opacity: 1;
        transform: translateY(-100px) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) translateX(200px);
    }
}

.asteroid {
    position: fixed;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    z-index: 2;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes asteroidDrift {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translate(300px, 300px) rotate(360deg);
        opacity: 0.2;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.6); }
}

.main-wrapper {
    padding-top: 180px;
    padding-bottom: 40px;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.page-header {
        margin-top: 109px;
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow), var(--glow);
    animation: slideIn 0.8s ease-out;
    position: relative;
    z-index: 5;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3em;
    background: linear-gradient(135deg, #00d4ff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.2em;
    font-weight: 400;
    letter-spacing: 1px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    animation: slideIn 0.8s ease-out;
}

.panel:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: var(--shadow), 0 0 30px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.input-panel {
    grid-column: 1;
    grid-row: 1;
}

.output-panel {
    grid-column: 2;
    grid-row: 1;
}

.operations-panel {
    grid-column: 1;
    grid-row: 2;
    max-height: 400px;
}

.recipe-panel {
    grid-column: 2;
    grid-row: 2;
    max-height: 400px;
}

.panel-header {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.panel-header h2 {
    font-size: 1.2em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    color: var(--text-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9em;
    width: 200px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.search-box::placeholder {
    color: var(--text-secondary);
}

textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    color: var(--text-primary);
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    resize: none;
    min-height: 300px;
    backdrop-filter: blur(5px);
}

textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.05);
}

textarea::placeholder {
    color: var(--text-secondary);
}

.input-info, .output-info {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.operations-list {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(400px - 60px);
}

.operations-category {
    margin-bottom: 20px;
}

.category-header {
    font-size: 1em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.operation-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: move;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.operation-item:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.operation-item i {
    color: var(--primary-color);
    width: 20px;
    font-size: 1.1em;
}

.operation-item.dragging {
    opacity: 0.5;
}

.recipe-list {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(400px - 60px);
    min-height: 100px;
}

.recipe-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.recipe-item:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.recipe-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.recipe-item-number {
    background: var(--primary-gradient);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.recipe-item-actions {
    display: flex;
    gap: 5px;
}

.recipe-item-actions button {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.recipe-item-actions button:hover {
    background: rgba(245, 101, 101, 0.2);
    color: var(--danger-color);
    border-color: var(--danger-color);
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    margin: 15% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), var(--glow);
    position: relative;
    border: 2px solid var(--border-color);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
    transition: all 0.3s;
}

.close:hover {
    color: var(--text-primary);
    transform: scale(1.2);
}

.modal-content h3 {
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5em;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 1em;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.operation-params {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: none;
    backdrop-filter: blur(10px);
}

.operation-params.active {
    display: block;
}

.operation-params label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.operation-params input {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
}

/* Detection Panel Styles */
.detection-panel {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: slideDown 0.4s ease-out;
    position: relative;
}

.detection-close-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.detection-close-wrapper .btn-close-detection {
    background: rgba(245, 101, 101, 0.9);
    border: none;
    color: white;
    font-size: 0.9em;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 0 12px 0 12px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.3);
}

.detection-close-wrapper .btn-close-detection:hover {
    background: rgba(245, 101, 101, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.5);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Primary Detection Card - Most Prominent */
.detection-primary-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    border-left: 5px solid var(--success-color);
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.detection-primary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    animation: shimmer 3s infinite;
}

.detection-primary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35), 0 6px 12px rgba(0, 0, 0, 0.15);
}

.primary-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.primary-icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.primary-icon-wrapper i {
    color: white;
    font-size: 1.8em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.primary-info {
    flex: 1;
}

.primary-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 10px;
}

.primary-type-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-type {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2em;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shine 2.5s infinite;
}

.primary-confidence {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e67e22 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

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

.btn-primary-action {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary-action:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.6);
}

.btn-primary-action:active {
    transform: translateY(-1px);
}

.btn-primary-action i {
    font-size: 1.2em;
}

/* Detection Cards - For Suggestions and Alternatives */
.detection-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.detection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.3);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.3em;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
    width: 24px;
    text-align: center;
}

.card-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestions-list:empty::after {
    content: 'No suggestions available';
    color: var(--text-secondary);
    font-style: italic;
    padding: 10px;
    text-align: center;
}

.suggestion-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.suggestion-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.suggestion-badge:hover::before {
    left: 100%;
}

.suggestion-badge:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.suggestion-badge:active {
    transform: translateX(5px) scale(1);
}

.suggestion-badge i {
    font-size: 1.2em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    width: 20px;
    text-align: center;
}

.suggestion-badge span {
    flex: 1;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alternative-badge {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.95em;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alternative-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s;
    border-radius: 10px 0 0 10px;
}

.alternative-badge:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    border-color: var(--primary-color);
    transform: translateX(8px);
    padding-left: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.alternative-badge:hover::before {
    transform: scaleY(1);
}

.alternative-badge .alt-type {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1em;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alternative-badge .alt-type::before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: 900;
}

.alternative-badge .alt-confidence {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.25) 0%, rgba(230, 126, 34, 0.25) 100%);
    color: var(--warning-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    border: 1px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.2);
    min-width: 50px;
    text-align: center;
    transition: all 0.3s;
}

.alternative-badge:hover .alt-confidence {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.4) 0%, rgba(230, 126, 34, 0.4) 100%);
    border-color: rgba(243, 156, 18, 0.5);
    box-shadow: 0 3px 8px rgba(243, 156, 18, 0.3);
    transform: scale(1.05);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .input-panel {
        grid-column: 1;
        grid-row: 1;
    }
    
    .output-panel {
        grid-column: 1;
        grid-row: 2;
    }
    
    .operations-panel {
        grid-column: 1;
        grid-row: 3;
    }
    
    .recipe-panel {
        grid-column: 1;
        grid-row: 4;
    }
    
    .nav-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2em;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .search-box {
        width: 100%;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(5, 8, 20, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 20px 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .brand-name {
        font-size: 1.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
    background: rgba(5, 8, 20, 0.95);
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.footer-domain {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-section h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: rgba(184, 197, 214, 0.6);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
}

/* Selection color */
::selection {
    background: var(--primary-color);
    color: var(--bg-dark);
}

