/* Custom CSS for bash.cards - Modern Framework Version */

:root {
    --primary-green: #28a745;
    --terminal-green: #00ff00;
    --dark-bg: #0d1117;
    --card-bg: #161b22;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --success-green: #198754;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
}

/* Global Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar Styling */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar {
    z-index: 1050;
}

.navbar-nav {
    gap: 0.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-green) !important;
    background-color: rgba(40, 167, 69, 0.1);
}

.navbar-nav .nav-link.text-success {
    background-color: rgba(40, 167, 69, 0.15);
}

/* Responsive navbar adjustments */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        margin-bottom: 0.25rem;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(40, 167, 69, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.demo-container {
    position: relative;
    z-index: 2;
}

.demo-iframe {
    border: 2px solid var(--primary-green);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

/* Pulse Button Animation */
.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Cards Section */
.cards-section {
    min-height: 50vh;
    position: relative;
    z-index: 10;
    background: #f8f9fa;
}

.section-header h2 {
    color: #2c3e50;
}

.cards-container {
    min-height: 400px;
}

/* Deck Container Styling */
.deck-container {
    margin-bottom: 3rem;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.deck-title {
    font-family: "VT323", monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deck-title::before {
    content: "🃏";
    font-size: 1.5rem;
}

/* Card Display Grid */
.card-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    justify-items: center;
}

/* Individual Card Preview */
.card-preview {
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 200px;
    height: 300px;
    margin: 0;
    padding: 0;
}

.card-preview:hover {
    transform: translateY(-10px);
}

/* Card 3D Structure */
.scene {
    perspective: 1000px;
    width: 200px;
    height: 300px;
    position: relative;
    margin: 0;
    padding: 0;
}

.card {
    width: 194px;
    height: 298px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 9px;
    box-shadow: 0 4px 7px rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0;
}

.card.flipped {
    transform: rotateY(180deg);
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 9px;
    border: 2px solid var(--primary-green);
    overflow: hidden;
    box-sizing: border-box;
}

.front {
    z-index: 2;
    background-color: #ffffff;
}

.back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
}

/* Card Action Buttons */
.script-btn {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 8px 12px;
    font-family: "Inter", sans-serif;
    font-size: 0.875rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.print-btn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) rotateY(180deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 8px 12px;
    font-family: "Inter", sans-serif;
    font-size: 0.875rem;
    background: var(--warning-yellow);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-preview:hover .script-btn,
.card-preview:hover .print-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Delete Button */
.btn-delete {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger-red);
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.card-preview:hover .btn-delete {
    opacity: 1;
    bottom: -40px;
}

/* Show/Hide Toggle */
.show-toggle {
    color: var(--primary-green);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
}

.show-toggle:hover {
    background: rgba(40, 167, 69, 0.2);
    text-decoration: none;
    color: var(--primary-green);
}

.show-toggle::after {
    content: "↓";
    transition: transform 0.3s ease;
}

.deck-container.collapsed .show-toggle::after {
    transform: rotate(180deg);
}

/* Collapsed deck state */
.deck-container.collapsed .card-display .card-preview:nth-child(n+5) {
    display: none;
}

/* Features Section */
.features-section {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    position: relative;
    z-index: 10;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 15px 15px 0 0;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Loading States */
.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

/* Footer */
.social-links a {
    transition: color 0.3s ease;
    font-size: 1.2rem;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-green) !important;
    transform: translateY(-2px);
}

footer {
    position: relative;
    z-index: 10;
}

footer h5 {
    margin-bottom: 0.5rem;
}

footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Print Styles */
@media print {
    .navbar,
    .features-section,
    .modal {
        display: none !important;
    }
    
    .hero-section {
        background: white;
        color: black;
    }
    
    .card-preview {
        break-inside: avoid;
    }
}
