:root {
    --primary: #00ff95;
    --secondary: #ff00b1;
    --tertiary: #5e00ff;
    --dark-bg: #111111;
    --darker-bg: #0a0a0a;
    --medium-bg: #222222;
    --light-bg: #333333;
    --neon-glow: 0 0 8px rgba(0, 255, 149, 0.7);
    --pink-glow: 0 0 8px rgba(255, 0, 177, 0.7);
    --purple-glow: 0 0 8px rgba(94, 0, 255, 0.7);
}

/* Glitch effect animation */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Neon pulse animation */
@keyframes neonPulse {
    0% { text-shadow: 0 0 7px var(--primary), 0 0 10px var(--primary); }
    50% { text-shadow: 0 0 15px var(--primary), 0 0 25px var(--primary); }
    100% { text-shadow: 0 0 7px var(--primary), 0 0 10px var(--primary); }
}

/* Scanning line effect */
@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: #ffffff;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 149, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 177, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(94, 0, 255, 0.05) 0%, transparent 30%),
        linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: 0.3;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.7;
    z-index: 1001;
    animation: scanline 6s linear infinite;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

h1 {
    font-family: 'Permanent Marker', cursive;
    color: var(--primary);
    text-shadow: var(--neon-glow);
    margin-bottom: 1rem;
    position: relative;
    animation: neonPulse 2s infinite;
}

h1:hover {
    animation: glitch 0.3s infinite;
}

h2 {
    font-size: 1.5rem;
    color: var(--secondary);
    text-shadow: var(--pink-glow);
    margin-bottom: 0.5rem;
}

.section-box {
    background-color: rgba(17, 17, 17, 0.85);
    border: 1px solid var(--primary);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--primary), inset 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.section-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

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

input, button, textarea, select {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 4px;
    border: 1px solid var(--medium-bg);
    background-color: var(--light-bg);
    color: white;
    transition: all 0.3s ease;
}

input[type="text"], input[type="file"], textarea {
    background-color: var(--light-bg);
    border-left: 3px solid var(--primary);
    color: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

button {
    background: linear-gradient(135deg, var(--tertiary), var(--secondary));
    color: white;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3), 0 0 10px rgba(94, 0, 255, 0.5);
}

button:hover::before {
    left: 100%;
}

textarea {
    height: 200px;
    resize: vertical;
}

/* Select styling */
select {
    appearance: none;
    background-color: var(--light-bg);
    border-left: 3px solid var(--tertiary);
    color: white;
    padding: 12px;
    border-radius: 4px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
}

select:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 0 1px var(--secondary);
}

select:focus {
    border-color: var(--tertiary);
    box-shadow: var(--purple-glow);
}

select {
    overflow-y: auto;
}

option {
    background-color: var(--medium-bg);
    color: white;
    padding: 8px 10px;
}

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

::-webkit-scrollbar-track {
    background: var(--medium-bg);
    border-radius: 10px;
}

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

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

/* Checkbox styling */
.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    margin: 5px;
    cursor: pointer;
    vertical-align: middle;
}

.checkbox-custom input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: var(--light-bg);
    border-radius: 4px;
    border: 1px solid var(--medium-bg);
    transition: all 0.3s ease;
}

.checkbox-custom:hover .checkmark {
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

.checkbox-custom input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary), var(--tertiary));
    border-color: transparent;
}

.checkbox-custom .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-custom input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-custom .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

.card-link {
    text-decoration: none;
    display: block;
}

.card {
    background: linear-gradient(145deg, rgba(34, 34, 34, 0.9), rgba(17, 17, 17, 0.9));
    border: 1px solid rgba(94, 0, 255, 0.2);
    border-radius: 8px;
    padding: 25px;
    margin: 25px auto;
    text-align: left;
    width: 90%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-out;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(94, 0, 255, 0.3);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.8em;
    position: relative;
    display: inline-block;
}

.card a {
    color: var(--secondary);
    transition: color 0.3s;
    text-decoration: none;
    position: relative;
}

.card a:hover {
    color: var(--primary);
}

.card a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.card a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.card p {
    color: #cccccc;
    font-size: 1em;
    line-height: 1.6;
}

/* Button container */
.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

/* Alert and Toast styling */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    display: none;
    position: relative;
    border-left: 4px solid;
    animation: fadeIn 0.3s ease-in;
}

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

.alert-success {
    background-color: rgba(0, 255, 149, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.alert-error {
    background-color: rgba(255, 0, 177, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
}

.toast::before {
    content: "";
    width: 20px;
    height: 20px;
    margin-right: 15px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.toast-success {
    background: linear-gradient(135deg, rgba(0, 255, 149, 0.9), rgba(0, 255, 149, 0.7));
    color: #111111;
    border-left: 4px solid var(--primary);
}

.toast-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111111'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

.toast-error {
    background: linear-gradient(135deg, rgba(255, 0, 177, 0.9), rgba(255, 0, 177, 0.7));
    color: #ffffff;
    border-left: 4px solid var(--secondary);
}

.toast-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
}

.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Action buttons */
.action-btn {
    background: var(--medium-bg);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-btn i {
    font-size: 1rem;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.start-btn {
    background: linear-gradient(135deg, var(--primary), rgba(0, 255, 149, 0.7));
    color: #111111;
    border: none;
}

.start-btn:hover {
    box-shadow: 0 0 15px rgba(0, 255, 149, 0.5);
    background: var(--primary);
}

.pause-btn {
    background: linear-gradient(135deg, var(--tertiary), rgba(94, 0, 255, 0.7));
    color: white;
    border: none;
}

.pause-btn:hover {
    box-shadow: 0 0 15px rgba(94, 0, 255, 0.5);
    background: var(--tertiary);
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: var(--primary);
    color: #111111;
}

.badge-secondary {
    background-color: var(--secondary);
    color: white;
}

.badge-tertiary {
    background-color: var(--tertiary);
    color: white;
}

/* Data display tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 6px;
    overflow: hidden;
}

.data-table th, .data-table td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-bg);
}

.data-table th {
    background-color: rgba(94, 0, 255, 0.2);
    color: var(--tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(odd) td {
    background-color: rgba(17, 17, 17, 0.6);
}

.data-table tr:nth-child(even) td {
    background-color: rgba(34, 34, 34, 0.6);
}

.data-table tr:hover td {
    background-color: rgba(94, 0, 255, 0.1);
}

/* Terminal-style code display */
.code-terminal {
    background-color: #0a0a0a;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    color: #00ff95;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.code-terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: #222;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.code-terminal::after {
    content: "• • •";
    position: absolute;
    top: 0;
    left: 12px;
    height: 25px;
    display: flex;
    align-items: center;
    color: #666;
    font-size: 20px;
    letter-spacing: -2px;
}

.code-terminal pre {
    margin-top: 25px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.code-terminal .prompt {
    color: var(--secondary);
    user-select: none;
}

/* User info badge */
.user-info {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.8), rgba(34, 34, 34, 0.8));
    border: 1px solid var(--tertiary);
    border-radius: 30px;
    padding: 6px 15px;
    margin: 10px 0;
    font-size: 0.9rem;
    box-shadow: var(--purple-glow);
}

.user-info::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 149, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 149, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 149, 0); }
}

.timestamp {
    margin-left: auto;
    font-family: 'Courier New', monospace;
    color: var(--secondary);
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        width: 100%;
        padding: 15px;
    }
    
    .section-box {
        padding: 15px;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}