:root {
    --primary-color: rgba(0, 255, 255, 0.9); 
    --secondary-color: rgba(0, 100, 255, 0.9);
    --text-color: rgba(255, 255, 255, 0.95);
    --highlight-color: rgba(0, 255, 255, 0.5);
    --background-dark: #0a0a1a;
    --background-light: rgba(10, 20, 40, 0.95);
    --neon-glow: 0 0 10px rgba(0, 255, 255, 0.7);
    --neon-glow-hover: 0 0 20px rgba(0, 255, 255, 0.9);
    --table-accent: rgba(0, 150, 255, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--background-dark);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #0a0a1a 0%, #000000 100%);
}

.circuit-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, #0a0a1a 20px, transparent 1%) center,
        linear-gradient(#0a0a1a 20px, transparent 1%) center,
        rgba(0, 150, 255, 0.1);
    background-size: 22px 22px;
    animation: circuitAnim 4s linear infinite;
    opacity: 0.8;
}

@keyframes circuitAnim {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 22px 22px, 22px 22px; }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(0, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(1px);
    animation: floatAnim 15s infinite linear;
    box-shadow: var(--neon-glow);
}

@keyframes floatAnim {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

.rule-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 30px;
    background: rgba(20, 40, 80, 0.3);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
                inset 0 0 20px rgba(0, 255, 255, 0.2);
    border: 1px solid var(--highlight-color);
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.rule-container:hover {
    box-shadow: 0 15px 40px rgba(0, 100, 255, 0.6), 
                inset 0 0 30px rgba(0, 255, 255, 0.3);
}

.rule-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0 0h100v100H0z" fill="none"/><path d="M20 20l60 60M80 20L20 80" stroke="rgba(0,255,255,0.05)" stroke-width="1"/></svg>');
    opacity: 0.5;
    z-index: -1;
}


.event-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-title {
    font-family: 'TT Octosquares Trial', sans-serif;
    font-size: 2.8rem;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    letter-spacing: 2px;
}

.event-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.event-header:hover .event-title::after {
    transform: scaleX(1);
}

.event-date {
    font-size: 1.3rem;
    color: rgba(200, 230, 255, 0.8);
    margin-bottom: 20px;
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 50, 100, 0.4);
    border-radius: 20px;
    border: 1px solid var(--highlight-color);
    box-shadow: var(--neon-glow);
    transition: all 0.3s ease;
}

.event-date:hover {
    box-shadow: var(--neon-glow-hover);
    transform: translateY(-2px);
}

.event-image {
    width: 320px;
    height: 220px;
    margin: 0 auto 20px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--highlight-color);
    box-shadow: var(--neon-glow);
    transition: all 0.5s ease;
}

.event-image:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow-hover);
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    filter: grayscale(30%) brightness(1.2) contrast(1.1);
    transition: all 0.5s ease;
}

.event-image:hover img {
    opacity: 0.9;
    filter: grayscale(0%) brightness(1.3) contrast(1.2);
}

.event-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.1) 0%, transparent 100%);
    z-index: 1;
}

.rules-content {
    background: rgba(10, 20, 40, 0.5);
    padding: 25px;
    border-radius: 10px;
    border-left: 3px solid var(--highlight-color);
    position: relative;
    margin-bottom: 30px;
}

.rules-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    animation: scan 2s linear infinite;
    opacity: 0;
}

.rules-content:hover::after {
    opacity: 1;
}

@keyframes scan {
    0% { height: 0; top: 0; }
    50% { height: 100%; top: 0; }
    100% { height: 0; top: 100%; }
}

.section-title {
    font-family: 'TT Octosquares Trial', sans-serif;
    font-size: 1.7rem;
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
    text-shadow: var(--neon-glow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-title:hover {
    text-shadow: var(--neon-glow-hover);
    transform: translateX(5px);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.rules-list {
    padding-left: 20px;
    margin-bottom: 30px;
    list-style-type: none;
}

.rules-list li {
    margin-bottom: 15px;
    color: var(--text-color);
    position: relative;
    padding-left: 25px;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    font-size: 1.05rem;
}

.rules-list li:hover {
    color: var(--primary-color);
    border-bottom: 1px solid var(--highlight-color);
    transform: translateX(5px);
}

.rules-list li::before {
    content: '■';
    color: var(--primary-color);
    font-size: 0.8em;
    position: absolute;
    left: 0;
    top: 0;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.round-table {
    margin: 25px 0;
    overflow-x: auto;
    background: rgba(0, 20, 40, 0.3);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: inset 0 0 15px rgba(0, 150, 255, 0.1);
}

.round-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: 'Courier New', monospace;
    background: rgba(10, 30, 60, 0.7);
    border: 1px solid var(--highlight-color);
    box-shadow: var(--neon-glow);
    animation: pulse 6s infinite alternate;
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.7); }
    50% { box-shadow: 0 0 20px rgba(0, 200, 255, 0.9); }
    100% { box-shadow: 0 0 15px rgba(0, 150, 255, 0.8); }
}

.round-table th {
    background: rgba(0, 50, 100, 0.5);
    color: var(--primary-color);
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid var(--highlight-color);
    font-family: 'TT Octosquares Trial', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.round-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    color: var(--text-color);
    position: relative;
}

.round-table tr:last-child td {
    border-bottom: none;
}

.round-table tr:hover td {
    background: var(--table-accent);
    color: var(--primary-color);
}

.round-table tr:hover td::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.terminal-line {
    position: relative;
    padding-left: 30px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.terminal-line::before {
    content: '>';
    position: absolute;
    left: 10px;
    color: var(--primary-color);
    font-weight: bold;
}

.back-button {
    display: block;
    width: 220px;
    margin: 40px auto 20px;
    padding: 14px 30px;
    background: rgba(0, 50, 100, 0.3);
    color: white;
    border: 1px solid var(--highlight-color);
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--neon-glow);
}

.back-button:hover {
    background: rgba(0, 150, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--neon-glow-hover);
    letter-spacing: 3px;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.back-button:hover::before {
    left: 100%;
}

.ai-assistant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: rgba(0, 150, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse 2s infinite alternate;
}

.ai-assistant:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.9);
}

.ai-assistant::before {
    content: 'AI';
    color: white;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.4rem;
}

.ai-panel {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    background: rgba(10, 30, 60, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.5);
    border: 1px solid var(--highlight-color);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.ai-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.ai-message {
    color: white;
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.5;
    padding: 10px;
    background: rgba(0, 20, 40, 0.5);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.ai-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--highlight-color);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.ai-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.ai-send {
    background: rgba(0, 150, 255, 0.8);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    float: right;
}

.ai-send:hover {
    background: rgba(0, 200, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

@media (max-width: 992px) {
    .rule-container {
        margin: 30px 20px;
        padding: 25px;
    }
    
    .event-title {
        font-size: 2.3rem;
    }
    
    .event-image {
        width: 280px;
        height: 180px;
    }
    
    .round-table {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .rule-container {
        margin: 20px 15px;
        padding: 20px;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .event-date {
        font-size: 1.1rem;
    }
    
    .event-image {
        width: 240px;
        height: 160px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .rules-list li {
        font-size: 1rem;
    }
    
    .round-table th, 
    .round-table td {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .ai-panel {
        width: 300px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .rule-container {
        margin: 15px 10px;
        padding: 15px;
    }
    
    .event-title {
        font-size: 1.8rem;
    }
    
    .event-image {
        width: 200px;
        height: 140px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .rules-content {
        padding: 15px;
    }
    
    .round-table {
        margin: 15px -5px;
        width: calc(100% + 10px);
    }
    
    .back-button {
        width: 180px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .ai-assistant {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .ai-panel {
        width: 280px;
        bottom: 90px;
        right: 10px;
    }
}

@keyframes rowEntry {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.round-table tr {
    animation: rowEntry 0.5s ease forwards;
}

.round-table tr:nth-child(1) { animation-delay: 0.1s; }
.round-table tr:nth-child(2) { animation-delay: 0.2s; }
.round-table tr:nth-child(3) { animation-delay: 0.3s; }
.round-table tr:nth-child(4) { animation-delay: 0.4s; }
.round-table tr:nth-child(5) { animation-delay: 0.5s; }