/* Codevia Lab - Main Stylesheet */

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

:root {
    --primary: #00ff99;
    --primary-dim: rgba(0, 255, 153, 0.1);
    --primary-border: rgba(0, 255, 153, 0.3);
    --bg-dark: #0a0a1a;
    --bg-mid: #1a1a3a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-white: #ffffff;
    --text-gray: #aaaaaa;
    --text-dim: #666666;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 50%, #0f2027 100%);
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

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

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--text-white);
}

nav {
    display: flex;
    gap: 40px;
}

nav a {
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 180px 20px 100px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Neural Network Canvas Background */
#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero > *:not(#neural-canvas) {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 600px;
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: #00cc7a;
    transform: translateY(-2px);
    opacity: 1;
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    opacity: 1;
}

/* Marquee Animation */
.marquee-section {
    padding: 60px 0;
    overflow: hidden;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.marquee-content {
    display: flex;
    animation: scroll 25s linear infinite;
    gap: 60px;
    padding-right: 60px;
}

.marquee.reverse .marquee-content {
    animation-direction: reverse;
}

.marquee-content span {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-white);
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

.marquee-content span:hover {
    opacity: 0.4;
    color: var(--primary);
}

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

/* Section Styling */
section {
    padding: 100px 0;
}

section.alt-bg {
    background: rgba(0, 0, 0, 0.2);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px 30px;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary);
    stroke-width: 1.5;
    fill: none;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary);
    transform: scale(1.1);
}

.service-card:hover .service-icon svg {
    stroke: var(--bg-dark);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-gray);
    margin-bottom: 24px;
    line-height: 1.7;
}

.service-card .price {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 24px;
}

.about-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    position: relative;
    overflow: hidden;
}

.about-image svg {
    width: 180px;
    height: 180px;
    stroke: var(--primary);
    stroke-width: 1;
    fill: none;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

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

.about-image::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

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

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

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.contact-info p {
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-item-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-dim);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-item-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
    stroke-width: 1.5;
    fill: none;
}

.contact-item:hover .contact-item-icon {
    background: var(--primary);
}

.contact-item:hover .contact-item-icon svg {
    stroke: var(--bg-dark);
}

.contact-item-text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-item-text p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group select option {
    background: var(--bg-dark);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-light);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-white);
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Page Header */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 255, 153, 0.05) 0%, transparent 100%);
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 16px;
}

.page-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 968px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        border-bottom: 1px solid var(--border-light);
    }

    nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 140px 20px 80px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

/* ==========================================
   VISUAL ENHANCEMENTS - Animations & Effects
   ========================================== */

/* Page Load Transition */
body {
    opacity: 0;
    animation: pageLoad 0.6s ease-out forwards;
}

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

/* Scroll-Triggered Fade-In Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* Enhanced Card Hover Effects with Glow */
.service-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--primary));
    border-radius: 18px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 255, 153, 0.15),
        0 0 30px rgba(0, 255, 153, 0.1);
}

.service-card:hover::before {
    opacity: 0.5;
}

/* Stat Item Enhanced Hover */
.stat-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 0;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary-border);
    box-shadow: 0 10px 30px rgba(0, 255, 153, 0.1);
}

.stat-item:hover::after {
    width: 200%;
    height: 200%;
}

.stat-item .number,
.stat-item .label {
    position: relative;
    z-index: 1;
}

/* Button Shimmer Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 255, 153, 0.3);
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    box-shadow:
        0 6px 20px rgba(0, 255, 153, 0.4),
        0 0 40px rgba(0, 255, 153, 0.2);
}

/* Outline Button Enhancement */
.btn-outline {
    position: relative;
    overflow: hidden;
}

.btn-outline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-outline:hover {
    color: var(--bg-dark);
    border-color: var(--primary);
}

.btn-outline:hover::after {
    opacity: 1;
}

/* Floating Background Orbs */
.floating-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #00ccff 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation-delay: -7s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #9933ff 0%, transparent 70%);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.05);
    }
}

/* Animated Gradient Text */
.gradient-text {
    background: linear-gradient(
        90deg,
        var(--primary),
        #00ccff,
        var(--primary),
        #00ccff
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary-border),
        var(--primary),
        var(--primary-border),
        transparent
    );
    margin: 0;
    border: none;
}

/* Enhanced About Image */
.about-image {
    transition: all 0.4s ease;
}

.about-image:hover {
    transform: scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 255, 153, 0.1),
        0 0 60px rgba(0, 255, 153, 0.05);
}

/* Contact Item Enhancement */
.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

/* Form Input Focus Glow */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.15);
}

/* Contact Form Card Enhancement */
.contact-form {
    transition: all 0.4s ease;
}

.contact-form:hover {
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 255, 153, 0.05);
}

/* Page Header Enhancement */
.page-header {
    position: relative;
    overflow: hidden;
}

/* Hero Section - Ensure content is above orbs */
.hero > *:not(#neural-canvas):not(.floating-orbs) {
    position: relative;
    z-index: 2;
}

/* Logo Hover Effect */
.logo {
    transition: all 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(0, 255, 153, 0.5);
    opacity: 1;
}

/* Nav Link Underline Animation */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Footer Enhancement */
.footer-col ul li a {
    transition: all 0.3s ease;
    display: inline-block;
}

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

/* Marquee Enhancement */
.marquee-content span {
    transition: all 0.4s ease;
}

.marquee-content span:hover {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(0, 255, 153, 0.5);
}

/* ==========================================
   DIGITAL SIGNING SYSTEM STYLES
   ========================================== */

/* Signing Container */
.signing-container,
.verify-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.signing-info h2,
.verify-form h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.signing-info p {
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
    stroke-width: 1.5;
    fill: none;
}

.feature-item:hover .feature-icon {
    background: var(--primary);
    transform: scale(1.1);
}

.feature-item:hover .feature-icon svg {
    stroke: var(--bg-dark);
}

.feature-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.feature-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Signing Form */
.signing-form,
.verify-form {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.4s ease;
}

.signing-form:hover,
.verify-form:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 255, 153, 0.05);
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-white);
}

.form-section > p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 24px;
}

.upload-zone.small {
    padding: 24px 20px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.upload-zone.has-file {
    border-color: var(--primary-border);
    border-style: solid;
}

.upload-content svg {
    width: 48px;
    height: 48px;
    stroke: var(--primary);
    stroke-width: 1.5;
    fill: none;
    margin-bottom: 16px;
    opacity: 0.7;
}

.upload-zone.small .upload-content svg {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
}

.upload-content p {
    font-size: 1rem;
    color: var(--text-white);
    margin-bottom: 4px;
}

.upload-content span {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 10px;
}

.file-preview svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary);
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.file-name {
    display: block;
    font-weight: 500;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.remove-file {
    background: rgba(255, 100, 100, 0.2);
    border: none;
    color: #ff6b6b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remove-file:hover {
    background: rgba(255, 100, 100, 0.4);
}

/* Signature Input Tabs */
.signature-input-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-gray);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--primary-border);
    color: var(--text-white);
}

.tab-btn.active {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Signing Result */
.signing-result {
    background: var(--bg-card);
    border: 1px solid var(--primary-border);
    border-radius: 16px;
    padding: 40px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.result-header svg {
    width: 48px;
    height: 48px;
    stroke: var(--primary);
    stroke-width: 1.5;
    fill: none;
}

.result-header h3 {
    font-size: 1.4rem;
    color: var(--primary);
}

/* Result Details */
.result-details {
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-gray);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.detail-row code,
.detail-row span:not(.label) {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    color: var(--text-white);
    word-break: break-all;
    text-align: right;
}

/* Signature Display */
.signature-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.signature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.signature-header span {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.copy-btn {
    padding: 6px 12px;
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.signature-display code {
    display: block;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.75rem;
    color: var(--text-gray);
    word-break: break-all;
    line-height: 1.6;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.result-actions .btn {
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

/* Verify Result Card */
.verify-result {
    max-width: 600px;
    margin: 0 auto;
}

.result-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.result-card.valid {
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(0, 255, 153, 0.15);
}

.result-card.invalid {
    border-color: #ff6b6b;
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.15);
}

.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-card.valid .result-icon {
    background: var(--primary-dim);
}

.result-card.invalid .result-icon {
    background: rgba(255, 107, 107, 0.15);
}

.result-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 2;
    fill: none;
}

.result-card.valid .result-icon svg {
    stroke: var(--primary);
}

.result-card.invalid .result-icon svg {
    stroke: #ff6b6b;
}

.result-card h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.result-card.valid h2 {
    color: var(--primary);
}

.result-card.invalid h2 {
    color: #ff6b6b;
}

.result-card > p {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.result-card .result-details {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.result-card .result-actions {
    justify-content: center;
}

/* Responsive */
@media (max-width: 968px) {
    .signing-container,
    .verify-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .verify-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .signing-form,
    .verify-form,
    .signing-result,
    .result-card {
        padding: 24px 20px;
    }

    .upload-zone {
        padding: 30px 20px;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }

    .signature-input-tabs {
        flex-direction: column;
    }
}
