:root {
    --primary-color: #7b2cbf;
    --secondary-color: #5a189a;
    --accent-color: #e0aaff;
    --dark-color: #10002b;
    --light-color: #c8b6ff;
    --success-color: #42f587;
    --warning-color: #ffaa00;
    --white: #ffffff;
    --black: #000000;
    --gradient-start: #240046;
    --gradient-end: #3c096c;
    --card-bg: rgba(16, 0, 43, 0.7);
    --input-bg: rgba(16, 0, 43, 0.7);
    --header-height: 70px;
    --border-radius: 16px;
    --glow-strength: 10px;
    --button-hover-scale: 1.05;
}

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

body {
    background-color: var(--dark-color);
    color: var(--white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.sacred-geometry-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('sacred-geometry-bg.png');
    background-size: cover;
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

.app-container {
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.9) 0%, rgba(60, 9, 108, 0.9) 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 10px auto;
    max-width: 1200px;
    min-height: calc(100vh - 20px);
    overflow: hidden;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
    height: var(--header-height);
    padding: 0 20px;
    position: relative;
}

.app-title {
    color: var(--accent-color);
    font-size: clamp(1.3rem, 5vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
    text-shadow: 0 0 var(--glow-strength) rgba(224, 170, 255, 0.5);
    margin: 0 15px;
}

.power-button-container {
    position: relative;
    z-index: 10;
}

#power-button {
    background: none;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 10px;
}

#power-button:hover, #power-button:focus {
    transform: scale(var(--button-hover-scale));
    outline: none;
}

#power-button::before {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.power-button.power-on {
    background-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

.power-button.power-on::before {
    opacity: 0.7;
}

.power-button.power-off {
    background-color: transparent;
    box-shadow: none;
}

.power-icon {
    font-size: 24px;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.power-button.power-on .power-icon {
    color: var(--dark-color);
}

.help-button-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#help-button {
    background: none;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-left: 10px;
}

#help-button:hover, #help-button:focus {
    transform: scale(var(--button-hover-scale));
    outline: none;
    background-color: rgba(224, 170, 255, 0.2);
}

#help-button i {
    font-size: 24px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

#help-button:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.tutorial-button-container {
    position: relative;
    z-index: 10;
}

#tutorial-button {
    background: none;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 10px;
}

#tutorial-button:hover, #tutorial-button:focus {
    transform: scale(var(--button-hover-scale));
    outline: none;
    background-color: rgba(224, 170, 255, 0.2);
}

#tutorial-button i {
    font-size: 24px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

#tutorial-button:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--accent-color));
}

/* Main Interface */
#main-interface {
    transition: opacity 0.5s ease, filter 0.5s ease;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-interface.powered-off {
    opacity: 0.3;
    filter: grayscale(100%);
    pointer-events: none;
}

#main-interface.powered-on {
    opacity: 1;
    filter: none;
    pointer-events: all;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
    background-color: rgba(16, 0, 43, 0.5);
}

.tab-button {
    background: transparent;
    border: none;
    color: var(--light-color);
    cursor: pointer;
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 5px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tab-button i {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.tab-button.active {
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(224, 170, 255, 0.3);
    background: rgba(90, 24, 154, 0.3);
}

.tab-button:hover, .tab-button:focus {
    color: var(--accent-color);
    background: rgba(90, 24, 154, 0.2);
}

/* Tab Content */
.tabs-container {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

.tab-content {
    display: none;
    padding: 20px;
    height: 100%;
}

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

/* Category Filter Styles */
.category-filter-container, .crystal-presets-container {
    margin-bottom: 20px;
}

.filter-title, .presets-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.category-button {
    background: rgba(90, 24, 154, 0.3);
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    color: var(--light-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 12px;
    transition: all 0.3s ease;
}

.category-button:hover {
    background: rgba(90, 24, 154, 0.5);
    transform: translateY(-2px);
}

.category-button.active {
    background: var(--accent-color);
    color: var(--dark-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(224, 170, 255, 0.5);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.preset-button {
    background: rgba(123, 44, 191, 0.6);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    color: var(--white);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 7px 15px;
    transition: all 0.3s ease;
}

.preset-button:hover {
    background: rgba(123, 44, 191, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(224, 170, 255, 0.3);
}

.preset-button:active {
    transform: translateY(1px);
    box-shadow: 0 0 5px rgba(224, 170, 255, 0.5);
}

.crystal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.crystal-category-tag {
    background: rgba(90, 24, 154, 0.5);
    border-radius: 12px;
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 8px;
}

/* Crystal Section */
.crystal-selector-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    height: 100%;
}

.crystal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.crystal-item {
    position: relative;
    background: rgba(90, 24, 154, 0.5);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.crystal-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(224, 170, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.crystal-item:hover::before, .crystal-item:focus::before {
    opacity: 1;
}

.crystal-item.selected::before {
    background: radial-gradient(circle at center, rgba(224, 170, 255, 0.5) 0%, rgba(224, 170, 255, 0.2) 70%);
    opacity: 1;
    animation: crystal-selected-glow 2s infinite ease-in-out;
}

@keyframes crystal-selected-glow {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.crystal-item img {
    max-width: 70%;
    max-height: 60%;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 1;
    position: relative;
}

.crystal-item:hover img, .crystal-item:focus img {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.crystal-item.selected img {
    filter: drop-shadow(0 0 10px rgba(224, 170, 255, 0.9));
    animation: float 3s infinite ease-in-out;
}

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

.crystal-item:hover, .crystal-item:focus {
    background: rgba(123, 44, 191, 0.7);
    transform: translateY(-5px);
    outline: none;
}

.crystal-item.selected {
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.crystal-item img {
    max-width: 70%;
    max-height: 60%;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.crystal-item p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

.crystal-item::after {
    content: '+';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.crystal-item:hover::after {
    opacity: 0.7;
}

.crystal-item.selected::after {
    content: '✓';
    background: var(--accent-color);
    color: var(--dark-color);
    opacity: 1;
}

.selected-crystal-info {
    background: rgba(16, 0, 43, 0.5);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid var(--accent-color);
}

.selected-crystal-info h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* Target Panel */
.target-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    height: 100%;
}

/* Custom File Upload */
.custom-file-upload {
    position: relative;
    display: block;
    width: 100%;
}

.custom-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.custom-file-upload label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-file-upload label:hover {
    background: var(--primary-color);
    transform: scale(var(--button-hover-scale));
}

.image-preview-container {
    margin-top: 15px;
    width: 100%;
}

.image-preview {
    background: rgba(16, 0, 43, 0.7);
    border: 2px dashed var(--accent-color);
    border-radius: var(--border-radius);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-text {
    color: var(--light-color);
    font-style: italic;
    display: flex;
    align-items: center;
}

/* Form Controls */
.form-control, .form-range {
    background-color: var(--input-bg);
    border: 1px solid var(--secondary-color);
    color: var(--white);
    border-radius: calc(var(--border-radius) / 2);
}

.form-control:focus {
    background-color: rgba(16, 0, 43, 0.9);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(224, 170, 255, 0.5);
    color: var(--white);
}

.form-floating > .form-control {
    background-color: var(--input-bg);
    height: calc(3.5rem + 2px);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: var(--accent-color);
    background-color: transparent;
    height: auto;
    padding: 0 0.5rem;
}

.form-floating > label {
    color: var(--light-color);
    padding: 1rem 0.75rem;
    background: transparent;
}

.crystal-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px var(--accent-color);
}

.crystal-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px var(--accent-color);
}

.crystal-slider::-webkit-slider-runnable-track {
    height: 10px;
    background: rgba(90, 24, 154, 0.5);
    border-radius: 5px;
}

.crystal-slider::-moz-range-track {
    height: 10px;
    background: rgba(90, 24, 154, 0.5);
    border-radius: 5px;
}

.form-switch-container {
    padding: 10px 0;
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    margin-top: 0.2em;
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

.form-check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Help Modal */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 0, 43, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.help-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.help-modal-content {
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.95) 0%, rgba(60, 9, 108, 0.95) 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 0 30px rgba(224, 170, 255, 0.5);
    width: min(90%, 900px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modal-appear 0.5s ease-out forwards;
    border: 1px solid rgba(224, 170, 255, 0.3);
}

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

.help-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
}

.help-header h2 {
    color: var(--accent-color);
    margin: 0;
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(224, 170, 255, 0.5);
}

.close-help-btn {
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.close-help-btn:hover {
    color: var(--white);
    background-color: rgba(224, 170, 255, 0.2);
    transform: rotate(90deg);
}

.help-tabs {
    display: flex;
    flex-wrap: wrap;
    overflow-x: visible;
    background-color: rgba(16, 0, 43, 0.9);
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
    padding: 5px 10px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    max-height: none;
}

.help-tab-btn {
    background: transparent;
    border: none;
    color: var(--light-color);
    cursor: pointer;
    flex: 0 1 auto;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: auto;
    margin: 2px;
    border-radius: 6px;
}

.help-tab-btn.active {
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    background: rgba(90, 24, 154, 0.3);
}

.help-tab-btn:hover {
    color: var(--accent-color);
    background: rgba(90, 24, 154, 0.2);
}

.help-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    padding-top: 10px;
}

.help-section {
    display: none;
}

.help-section.active {
    display: block;
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.help-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
    padding-bottom: 10px;
}

.help-section h4 {
    color: var(--light-color);
    margin: 20px 0 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.help-section p, .help-section li {
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 10px;
}

.help-section ul, .help-section ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.help-tip {
    background: rgba(224, 170, 255, 0.1);
    border-left: 4px solid var(--accent-color);
    color: var(--white);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: flex-start;
}

.help-tip i {
    color: var(--accent-color);
    margin-right: 10px;
    margin-top: 3px;
    font-size: 1.2rem;
}

.help-tip p {
    margin: 0;
}

.help-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(224, 170, 255, 0.3);
    background-color: rgba(16, 0, 43, 0.5);
    gap: 10px;
}

.btn-manual {
    background: var(--accent-color);
    color: var(--dark-color);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-manual:hover {
    background: var(--light-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(224, 170, 255, 0.5);
}

/* Manual PDF styles */
.manual-pdf-container {
    background: white;
    padding: 20px;
    color: black;
}

.manual-pdf-container h1 {
    color: #7b2cbf;
    text-align: center;
    margin-bottom: 20px;
}

.manual-pdf-header {
    text-align: center;
    margin-bottom: 30px;
}

.manual-pdf-header img {
    max-width: 150px;
    margin-bottom: 15px;
}

/* Transmit Button */
.btn-transmit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    box-shadow: 0 5px 15px rgba(90, 24, 154, 0.5);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
    padding: 12px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.btn-transmit:hover, .btn-transmit:focus {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 5px 20px rgba(123, 44, 191, 0.7);
    transform: translateY(-3px);
    color: var(--white);
    outline: none;
}

/* Floating Transmit Button for Mobile */
.floating-transmit-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    display: none;
}

.btn-floating-transmit {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(90, 24, 154, 0.8);
    border: none;
    transition: all 0.3s ease;
}

.btn-floating-transmit:hover, .btn-floating-transmit:focus {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(123, 44, 191, 1);
    outline: none;
}

/* Transmission Overlay */
.transmission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(36, 0, 70, 0.95) 0%, rgba(16, 0, 43, 0.98) 70%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.transmission-overlay.active {
    opacity: 1;
    pointer-events: all;
    animation: overlay-pulse 10s infinite linear;
}

.transmission-overlay.exponential-level-1 {
    background: radial-gradient(circle at center, rgba(255, 102, 0, 0.1) 0%, rgba(36, 0, 70, 0.95) 70%);
}

.transmission-overlay.exponential-level-2 {
    background: radial-gradient(circle at center, rgba(255, 0, 102, 0.15) 0%, rgba(36, 0, 70, 0.95) 70%);
    animation: overlay-pulse 5s infinite linear, reality-distortion 3s infinite ease-in-out;
}

.transmission-overlay.exponential-level-3 {
    background: radial-gradient(circle at center, rgba(102, 0, 255, 0.2) 0%, rgba(36, 0, 70, 0.95) 70%);
    animation: overlay-pulse 3s infinite linear, reality-distortion 2s infinite ease-in-out, quantum-flux 4s infinite ease-in-out;
}

.transmission-overlay.exponential-level-4 {
    background: radial-gradient(circle at center, rgba(255, 0, 0, 0.25) 0%, rgba(255, 255, 0, 0.1) 50%, rgba(36, 0, 70, 0.95) 70%);
    animation: overlay-pulse 1s infinite linear, reality-distortion 1s infinite ease-in-out, quantum-flux 2s infinite ease-in-out, dimensional-tear 3s infinite ease-in-out;
}

.transmission-overlay.exponential-level-5 {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, rgba(255, 0, 255, 0.2) 30%, rgba(0, 255, 255, 0.1) 60%, rgba(36, 0, 70, 0.95) 70%);
    animation: overlay-pulse 0.5s infinite linear, reality-distortion 0.3s infinite ease-in-out, quantum-flux 1s infinite ease-in-out, dimensional-tear 1.5s infinite ease-in-out, reality-breakdown 2s infinite ease-in-out;
}

@keyframes overlay-pulse {
    0% { background: radial-gradient(circle at center, rgba(36, 0, 70, 0.95) 0%, rgba(16, 0, 43, 0.98) 70%); }
    50% { background: radial-gradient(circle at center, rgba(40, 0, 80, 0.95) 0%, rgba(16, 0, 43, 0.98) 70%); }
    100% { background: radial-gradient(circle at center, rgba(36, 0, 70, 0.95) 0%, rgba(16, 0, 43, 0.98) 70%); }
}

@keyframes reality-distortion {
    0% { filter: blur(0px) hue-rotate(0deg) saturate(1); }
    50% { filter: blur(2px) hue-rotate(180deg) saturate(2); }
    100% { filter: blur(0px) hue-rotate(360deg) saturate(1); }
}

@keyframes quantum-flux {
    0% { transform: scale(1) skew(0deg, 0deg); }
    25% { transform: scale(1.02) skew(1deg, 0deg); }
    50% { transform: scale(0.98) skew(0deg, 1deg); }
    75% { transform: scale(1.01) skew(-1deg, 0deg); }
    100% { transform: scale(1) skew(0deg, 0deg); }
}

@keyframes dimensional-tear {
    0% { 
        filter: blur(0px);
        border-style: solid;
    }
    50% { 
        filter: blur(3px);
        border-style: dashed;
    }
    100% { 
        filter: blur(0px);
        border-style: solid;
    }
}

@keyframes reality-breakdown {
    0% { 
        opacity: 1; 
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    }
    25% { 
        opacity: 0.8; 
        transform: perspective(1000px) rotateX(2deg) rotateY(1deg);
        filter: invert(0.1);
    }
    50% { 
        opacity: 0.9; 
        transform: perspective(1000px) rotateX(-1deg) rotateY(-2deg);
        filter: invert(0.2) hue-rotate(90deg);
    }
    75% { 
        opacity: 0.7; 
        transform: perspective(1000px) rotateX(1deg) rotateY(1deg);
        filter: invert(0.1) hue-rotate(180deg);
    }
    100% { 
        opacity: 1; 
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
        filter: none;
    }
}

.transmission-animation {
    position: relative;
    width: 100%;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sacred-geometry-mandala {
    position: absolute;
    width: min(500px, 90vw);
    height: min(500px, 90vw);
    background-image: url('sacred-mandala.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
    animation: rotate 60s linear infinite, pulse-glow 4s infinite ease-in-out;
    filter: drop-shadow(0 0 25px rgba(224, 170, 255, 0.8));
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0% { filter: drop-shadow(0 0 15px rgba(224, 170, 255, 0.6)); opacity: 0.8; }
    50% { filter: drop-shadow(0 0 30px rgba(224, 170, 255, 0.9)); opacity: 1; }
    100% { filter: drop-shadow(0 0 15px rgba(224, 170, 255, 0.6)); opacity: 0.8; }
}

.crystal-projection, .target-projection {
    position: absolute;
    width: min(150px, 30vw);
    height: min(150px, 30vw);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.5s ease;
    z-index: 5;
}

.crystal-projection {
    left: max(20%, 10px);
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 30px var(--accent-color);
    animation: crystal-pulse 4s infinite ease-in-out, crystal-radiate 8s infinite linear;
}

.target-projection {
    right: max(20%, 10px);
    border: 3px solid var(--light-color);
    box-shadow: 0 0 30px var(--light-color);
    animation: target-pulse 4s infinite ease-in-out, target-receive 3s infinite ease-in-out;
}

@keyframes crystal-pulse {
    0% { box-shadow: 0 0 20px var(--accent-color); transform: scale(1) rotate(0deg); }
    50% { box-shadow: 0 0 40px var(--accent-color); transform: scale(1.08) rotate(5deg); }
    100% { box-shadow: 0 0 20px var(--accent-color); transform: scale(1) rotate(0deg); }
}

@keyframes target-pulse {
    0% { box-shadow: 0 0 20px var(--light-color); transform: scale(1) rotate(0deg); }
    50% { box-shadow: 0 0 40px var(--light-color); transform: scale(1.08) rotate(-5deg); }
    100% { box-shadow: 0 0 20px var(--light-color); transform: scale(1) rotate(0deg); }
}

@keyframes crystal-radiate {
    0%, 100% { box-shadow: 0 0 30px var(--accent-color); }
    25% { box-shadow: 0 0 30px var(--accent-color), 0 0 60px rgba(224, 170, 255, 0.4); }
    50% { box-shadow: 0 0 30px var(--accent-color), 0 0 80px rgba(224, 170, 255, 0.5), 0 0 120px rgba(224, 170, 255, 0.2); }
    75% { box-shadow: 0 0 30px var(--accent-color), 0 0 60px rgba(224, 170, 255, 0.4); }
}

@keyframes target-receive {
    0%, 100% { box-shadow: 0 0 30px var(--light-color); }
    50% { box-shadow: 0 0 30px var(--light-color), 0 0 60px rgba(200, 182, 255, 0.6), 0 0 100px rgba(200, 182, 255, 0.3); }
}

#energy-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.energy-beam {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to right, 
        rgba(224, 170, 255, 0.1), 
        rgba(224, 170, 255, 0.8) 30%, 
        rgba(224, 170, 255, 0.9) 50%,
        rgba(224, 170, 255, 0.8) 70%,
        rgba(224, 170, 255, 0.1));
    transform: translateY(-50%);
    z-index: -1;
    filter: blur(5px);
    animation: beam-pulse 1.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes beam-pulse {
    0% { opacity: 0.5; height: 8px; filter: blur(5px); }
    50% { opacity: 0.9; height: 18px; filter: blur(8px); }
    100% { opacity: 0.5; height: 8px; filter: blur(5px); }
}

.transmission-info {
    margin-top: 30px;
    text-align: center;
    width: min(500px, 90%);
    background: rgba(16, 0, 43, 0.7);
    border-radius: var(--border-radius);
    padding: 20px;
}

.transmission-info h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transmission-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.transmission-info p i {
    margin-right: 10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.progress {
    height: 10px;
    background-color: rgba(200, 182, 255, 0.2);
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--accent-color);
    transition: width 0.1s linear;
}

.success-message {
    background: rgba(16, 0, 43, 0.8);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 25px;
    border-left: 6px solid var(--success-color);
    text-align: center;
    animation: success-appear 0.8s ease-out, success-glow 3s infinite alternate;
    box-shadow: 0 0 30px rgba(66, 245, 135, 0.4);
}

@keyframes success-glow {
    from { box-shadow: 0 0 20px rgba(66, 245, 135, 0.3); border-color: var(--success-color); }
    to { box-shadow: 0 0 40px rgba(66, 245, 135, 0.6); border-color: #65ffaa; }
}

@keyframes success-appear {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-message h2 {
    color: var(--success-color);
    margin-bottom: 20px;
    font-size: 2rem;
    text-shadow: 0 0 15px rgba(66, 245, 135, 0.7);
    animation: success-text-glow 2s infinite alternate;
}

@keyframes success-text-glow {
    from { text-shadow: 0 0 10px rgba(66, 245, 135, 0.5); }
    to { text-shadow: 0 0 20px rgba(66, 245, 135, 0.9); }
}

.success-message p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.btn-success {
    background-color: var(--success-color);
    border: none;
    color: var(--dark-color);
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(66, 245, 135, 0.3);
}

.btn-success:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(66, 245, 135, 0.7);
    background-color: #65ffaa;
}

/* Multi Crystal Selection Styles */
.multi-crystal-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.mini-crystal {
    width: 40%;
    height: 40%;
    margin: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mini-crystal img {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.selected-crystals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.badge-count {
    background-color: var(--accent-color);
    color: var(--dark-color);
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.btn-clear-selections {
    background: rgba(123, 44, 191, 0.3);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-clear-selections:hover {
    background: rgba(123, 44, 191, 0.5);
    color: var(--white);
}

.multi-selection-info {
    background: rgba(224, 170, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    border-left: 2px solid var(--accent-color);
    font-size: 0.9rem;
}

.multi-selection-info i {
    color: var(--accent-color);
    margin-right: 5px;
}

.energy-synergy-note {
    color: var(--accent-color);
    font-style: italic;
    margin-top: 5px;
    font-size: 0.9rem;
}

/* Quantum AI Amplifier Interface */
.quantum-amplifier-interface {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 0, 43, 0.9), rgba(36, 0, 70, 0.9));
    border-radius: var(--border-radius);
    border: 2px solid rgba(66, 245, 135, 0.5);
    box-shadow: 0 0 20px rgba(66, 245, 135, 0.3);
    position: relative;
    overflow: hidden;
    animation: quantum-glow 3s infinite ease-in-out;
}

@keyframes quantum-glow {
    0% { box-shadow: 0 0 20px rgba(66, 245, 135, 0.3), inset 0 0 20px rgba(66, 245, 135, 0.1); }
    50% { box-shadow: 0 0 40px rgba(66, 245, 135, 0.6), inset 0 0 30px rgba(66, 245, 135, 0.2); }
    100% { box-shadow: 0 0 20px rgba(66, 245, 135, 0.3), inset 0 0 20px rgba(66, 245, 135, 0.1); }
}

.quantum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(66, 245, 135, 0.3);
    padding-bottom: 10px;
}

.quantum-header h3 {
    color: var(--success-color);
    margin: 0;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(66, 245, 135, 0.5);
    animation: text-pulse 2s infinite ease-in-out;
}

@keyframes text-pulse {
    0% { text-shadow: 0 0 10px rgba(66, 245, 135, 0.5); }
    50% { text-shadow: 0 0 20px rgba(66, 245, 135, 0.8), 0 0 30px rgba(66, 245, 135, 0.3); }
    100% { text-shadow: 0 0 10px rgba(66, 245, 135, 0.5); }
}

.hyperdrive-toggle {
    background: linear-gradient(135deg, #ff6600, #ffaa00);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
    animation: hyperdrive-pulse 2s infinite ease-in-out;
}

@keyframes hyperdrive-pulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 102, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(255, 102, 0, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 102, 0, 0.5); }
}

.hyperdrive-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 102, 0, 1);
}

.hyperdrive-toggle.active {
    background: linear-gradient(135deg, #ff0000, #ff6600);
    animation: hyperdrive-active 0.5s infinite alternate;
}

@keyframes hyperdrive-active {
    0% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
    100% { box-shadow: 0 0 40px rgba(255, 255, 0, 0.8); }
}

.quantum-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(16, 0, 43, 0.7);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--success-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.stat-value {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(66, 245, 135, 0.5);
    animation: value-flicker 3s infinite ease-in-out;
}

@keyframes value-flicker {
    0% { opacity: 1; }
    95% { opacity: 1; }
    96% { opacity: 0.8; }
    97% { opacity: 1; }
    98% { opacity: 0.9; }
    100% { opacity: 1; }
}

.quantum-visualization {
    background: rgba(16, 0, 43, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(66, 245, 135, 0.3);
    display: flex;
    justify-content: center;
}

#quantum-neural-display {
    border-radius: 4px;
    background: radial-gradient(circle at center, rgba(66, 245, 135, 0.1), transparent);
}

.quantum-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-stop-amplifier, .btn-reset-amplifier {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-stop-amplifier:hover, .btn-reset-amplifier:hover {
    background: rgba(255, 68, 68, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.btn-reset-amplifier {
    background: rgba(224, 170, 255, 0.2);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-reset-amplifier:hover {
    background: rgba(224, 170, 255, 0.4);
    box-shadow: 0 0 15px rgba(224, 170, 255, 0.5);
}

/* Advanced Timer System Styles */
.timer-mode-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(16, 0, 43, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(224, 170, 255, 0.3);
}

.timer-mode-selector h5 {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.timer-mode-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-timer-mode {
    padding: 8px 16px;
    border: 1px solid rgba(224, 170, 255, 0.4);
    background: rgba(90, 24, 154, 0.3);
    color: var(--light-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-timer-mode:hover {
    background: rgba(90, 24, 154, 0.5);
    transform: translateY(-1px);
}

.btn-timer-mode.active {
    background: var(--accent-color);
    color: var(--dark-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(224, 170, 255, 0.5);
}

.timer-configuration {
    margin-bottom: 20px;
}

.timer-duration-section {
    padding: 15px;
    background: rgba(16, 0, 43, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(224, 170, 255, 0.3);
    margin-bottom: 15px;
}

.timer-duration-section h5 {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.duration-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

.duration-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.duration-input-group label {
    color: var(--light-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.timer-input {
    width: 60px;
    text-align: center;
    padding: 8px;
    background: rgba(16, 0, 43, 0.8);
    border: 1px solid rgba(224, 170, 255, 0.4);
    color: var(--white);
    border-radius: 4px;
}

.timer-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(224, 170, 255, 0.5);
    outline: none;
}

.quick-duration-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-quick-duration {
    padding: 6px 12px;
    background: rgba(123, 44, 191, 0.4);
    border: 1px solid rgba(224, 170, 255, 0.4);
    color: var(--white);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.btn-quick-duration:hover {
    background: rgba(123, 44, 191, 0.6);
    transform: translateY(-1px);
}

.interval-settings {
    padding: 15px;
    background: rgba(16, 0, 43, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(224, 170, 255, 0.3);
    margin-bottom: 15px;
}

.interval-settings h5 {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.interval-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.interval-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.interval-input-group label {
    color: var(--light-color);
    font-size: 0.9rem;
    min-width: 120px;
}

.interval-input-group input {
    width: 80px;
    padding: 6px;
    background: rgba(16, 0, 43, 0.8);
    border: 1px solid rgba(224, 170, 255, 0.4);
    color: var(--white);
    border-radius: 4px;
    text-align: center;
}

.interval-input-group span {
    color: var(--light-color);
    font-size: 0.8rem;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-timer-control {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.btn-timer-control.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-timer-control.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 44, 191, 0.5);
}

.btn-timer-control.emergency {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: var(--white);
}

.btn-timer-control.emergency:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.5);
}

.advanced-timer-display {
    background: linear-gradient(135deg, rgba(16, 0, 43, 0.9), rgba(36, 0, 70, 0.9));
    border: 2px solid rgba(224, 170, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(224, 170, 255, 0.3);
}

.advanced-timer-display span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.btn-session-manage {
    padding: 18px 25px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 5px 15px rgba(90, 24, 154, 0.5), inset 0 -2px 5px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.btn-session-manage:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(123, 44, 191, 0.7), inset 0 -1px 3px rgba(0,0,0,0.2);
}

.btn-session-manage:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(90, 24, 154, 0.6), inset 0 -1px 3px rgba(0,0,0,0.3);
}

/* Session Manager Modal Styles */
.session-section {
    display: none;
}

.session-section.active {
    display: block;
    animation: fade-in 0.4s ease-out;
}

.session-tab-btn {
    background: transparent;
    border: none;
    color: var(--light-color);
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 15px;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.session-tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: rgba(90, 24, 154, 0.3);
}

.session-tab-btn:hover {
    color: var(--accent-color);
    background: rgba(90, 24, 154, 0.2);
}

.session-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-session-action {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-session-action.save {
    background: var(--accent-color);
    color: var(--dark-color);
}

.btn-session-action.save:hover {
    background: var(--light-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(224, 170, 255, 0.5);
}

.btn-session-action.apply {
    background: var(--success-color);
    color: var(--dark-color);
}

.btn-session-action.apply:hover {
    background: #65ffaa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 245, 135, 0.5);
}

.file-upload-area {
    border: 3px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(16, 0, 43, 0.5);
}

.file-upload-area:hover, .file-upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(90, 24, 154, 0.3);
    transform: scale(1.02);
}

.file-upload-area .upload-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.file-upload-area p {
    margin: 0;
    font-size: 1.1rem;
}

.file-upload-area small {
    color: var(--light-color);
}

.session-preview-content {
    background: rgba(16, 0, 43, 0.7);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(224, 170, 255, 0.3);
    max-height: 250px;
    overflow-y: auto;
}

.session-preview-content strong {
    color: var(--accent-color);
}

.preview-list {
    list-style: none;
    padding: 0;
}

.preview-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(224, 170, 255, 0.1);
}

.preview-list li:last-child {
    border-bottom: none;
}

.preview-crystals {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.crystal-tag {
    background: var(--secondary-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.session-modal {
    display: none;
}

.confirmation-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.95), rgba(60, 9, 108, 0.95));
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    font-weight: 500;
}

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

.confirmation-toast.success {
    border-left-color: var(--success-color);
}

.confirmation-toast.error {
    border-left-color: #ff4444;
}

.confirmation-toast.warning {
    border-left-color: #ffaa00;
}

.confirmation-toast.info {
    border-left-color: var(--accent-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .duration-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .timer-mode-buttons {
        flex-direction: column;
    }
    
    .timer-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .emergency-controls {
        flex-direction: column;
    }
}

/* Tutorial Modal */
.tutorial-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 0, 43, 0.95);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tutorial-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.tutorial-modal-content {
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.95) 0%, rgba(60, 9, 108, 0.95) 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 0 30px rgba(224, 170, 255, 0.5);
    width: min(95%, 800px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: tutorial-appear 0.5s ease-out forwards;
    border: 1px solid rgba(224, 170, 255, 0.3);
}

@keyframes tutorial-appear {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tutorial-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(224, 170, 255, 0.3);
    background: rgba(16, 0, 43, 0.8);
}

.tutorial-header h2 {
    color: var(--accent-color);
    margin: 0;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(224, 170, 255, 0.5);
}

.close-tutorial-btn {
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
}

.close-tutorial-btn:hover {
    color: var(--white);
    background-color: rgba(224, 170, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.tutorial-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: rgba(90, 24, 154, 0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--light-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 12.5%;
}

.step-counter {
    color: var(--light-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.tutorial-steps {
    flex-grow: 1;
    margin-bottom: 25px;
}

.tutorial-step {
    display: none;
    animation: step-fade-in 0.5s ease-out;
}

.tutorial-step.active {
    display: block;
}

@keyframes step-fade-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tutorial-step h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.tutorial-step p {
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.tutorial-step ul {
    color: var(--white);
    padding-left: 20px;
    margin-bottom: 15px;
}

.tutorial-step li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.tutorial-highlight {
    background: rgba(224, 170, 255, 0.15);
    border-left: 4px solid var(--accent-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.tutorial-highlight h4 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.tutorial-highlight p {
    margin: 0;
    color: var(--white);
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(224, 170, 255, 0.3);
}

.btn-tutorial {
    background: var(--accent-color);
    color: var(--dark-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
}

.btn-tutorial:hover:not(:disabled) {
    background: var(--light-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(224, 170, 255, 0.5);
}

.btn-tutorial:disabled {
    background: rgba(90, 24, 154, 0.5);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tutorial-action-demo {
    background: rgba(66, 245, 135, 0.1);
    border: 1px solid rgba(66, 245, 135, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.tutorial-action-demo button {
    background: rgba(66, 245, 135, 0.8);
    color: var(--dark-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-action-demo button:hover {
    background: rgba(66, 245, 135, 1);
    transform: scale(1.05);
}

/* Mobile responsiveness for tutorial */
@media (max-width: 768px) {
    .tutorial-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .tutorial-header {
        padding: 15px 20px;
    }
    
    .tutorial-header h2 {
        font-size: 1.4rem;
    }
    
    .tutorial-content {
        padding: 20px;
    }
    
    .tutorial-navigation {
        flex-direction: column;
    }
    
    .btn-tutorial {
        width: 100%;
        justify-content: center;
    }
}

.scalar-wave-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.scalar-wave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    pointer-events: none;
    animation: scalar-expand 2s ease-out forwards;
}

.scalar-wave.level-1 {
    background: transparent;
    border-color: rgba(255, 102, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.4);
}

.scalar-wave.level-2 {
    background: transparent;
    border-color: rgba(255, 0, 102, 0.7);
    box-shadow: 0 0 30px rgba(255, 0, 102, 0.5);
    animation: scalar-expand 1.5s ease-out forwards, pulse-wave 0.5s infinite;
}

.scalar-wave.level-3 {
    background: transparent;
    border-color: rgba(102, 0, 255, 0.8);
    box-shadow: 0 0 40px rgba(102, 0, 255, 0.6);
    animation: scalar-expand 1s ease-out forwards, pulse-wave 0.3s infinite, quantum-ripple 2s infinite;
}

.scalar-wave.level-4 {
    background: transparent;
    border-color: rgba(255, 0, 0, 0.9);
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.7), 0 0 100px rgba(255, 255, 0, 0.3);
    animation: scalar-expand 0.8s ease-out forwards, pulse-wave 0.2s infinite, quantum-ripple 1s infinite, reality-tear 1.5s infinite;
}

.scalar-wave.level-5 {
    background: transparent;
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.8), 0 0 120px rgba(255, 0, 255, 0.5), 0 0 180px rgba(0, 255, 255, 0.3);
    animation: scalar-expand 0.3s ease-out forwards, pulse-wave 0.1s infinite, quantum-ripple 0.5s infinite, reality-tear 0.8s infinite, dimensional-break 1s infinite;
}

@keyframes scalar-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(5);
    }
}

@keyframes quantum-ripple {
    0% { border-width: 2px; }
    50% { border-width: 6px; }
    100% { border-width: 2px; }
}

@keyframes reality-tear {
    0% { 
        filter: blur(0px);
        border-style: solid;
    }
    50% { 
        filter: blur(3px);
        border-style: dashed;
    }
    100% { 
        filter: blur(0px);
        border-style: solid;
    }
}

@keyframes dimensional-break {
    0% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        border-radius: 50%;
    }
    25% { 
        transform: translate(-50%, -50%) scale(1.2) rotate(90deg);
        border-radius: 20%;
    }
    50% { 
        transform: translate(-50%, -50%) scale(0.8) rotate(180deg);
        border-radius: 0%;
    }
    75% { 
        transform: translate(-50%, -50%) scale(1.1) rotate(270deg);
        border-radius: 30%;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
        border-radius: 50%;
    }
}

@keyframes scalar-field-pulse {
    0% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% { 
        opacity: 0.3;
        transform: scale(1);
    }
}

@keyframes quantum-rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced multiplier display */
.active-multiplier-display {
    background: linear-gradient(135deg, rgba(16, 0, 43, 0.9), rgba(36, 0, 70, 0.9));
    border: 2px solid rgba(224, 170, 255, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(224, 170, 255, 0.3);
}

.active-multiplier-display span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.btn-exponential.level-hyperdrive {
    background: linear-gradient(135deg, #ff6600, #ffaa00);
    color: white;
    border: 2px solid #ff8800;
    position: relative;
    overflow: hidden;
}

.btn-exponential.level-hyperdrive:hover {
    background: linear-gradient(135deg, #ff8800, #ffcc00);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 136, 0, 0.6);
}

.btn-exponential.level-hyperdrive.active {
    background: linear-gradient(135deg, #ff0000, #ff6600);
    animation: hyperdrive-active 1s infinite alternate;
}

.btn-exponential.level-infinity {
    background: linear-gradient(135deg, #ffffff, #e0aaff);
    color: #240046;
    border: 2px solid #ffffff;
    position: relative;
    overflow: hidden;
    font-weight: 800;
}

.btn-exponential.level-infinity:hover {
    background: linear-gradient(135deg, #ffffff, #c8b6ff);
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.8);
    animation: infinity-shimmer 0.5s infinite;
}

.btn-exponential.level-infinity.active {
    background: linear-gradient(135deg, #ffffff, #ff00ff, #00ffff);
    animation: infinity-active 0.5s infinite alternate, infinity-rotate 2s infinite linear;
}

@keyframes doubling-expand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(5);
        opacity: 0;
    }
}

@keyframes infinity-pulse {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 0.3; transform: scale(1); }
}

@keyframes reality-shift {
    0% { filter: hue-rotate(0deg); }
    25% { filter: hue-rotate(90deg); }
    50% { filter: hue-rotate(180deg); }
    75% { filter: hue-rotate(270deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes infinity-float {
    0% { transform: translateY(0px) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
    100% { transform: translateY(0px) rotate(360deg); opacity: 0.6; }
}

@keyframes infinity-glow {
    0% { 
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
        color: #ffffff;
    }
    100% { 
        text-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(0, 255, 255, 0.5);
        color: #00ffff;
    }
}

@keyframes doubling-glow {
    0% { 
        text-shadow: 0 0 10px rgba(255, 165, 0, 0.8);
        color: #ffa500;
    }
    100% { 
        text-shadow: 0 0 20px rgba(255, 165, 0, 1), 0 0 30px rgba(255, 215, 0, 0.5);
        color: #ffd700;
    }
}

@keyframes infinity-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes infinity-active {
    0% { 
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
        border-color: #ffffff;
    }
    100% { 
        box-shadow: 0 0 40px rgba(255, 255, 255, 1), 0 0 60px rgba(0, 255, 255, 0.5);
        border-color: #00ffff;
    }
}

@keyframes infinity-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes hyperdrive-active {
    0% { 
        box-shadow: 0 0 20px rgba(255, 102, 0, 0.8);
        border-color: #ff6600;
    }
    100% { 
        box-shadow: 0 0 40px rgba(255, 102, 0, 1), 0 0 60px rgba(255, 215, 0, 0.5);
        border-color: #ffd700;
    }
}

.infinity-field-overlay {
    z-index: 998;
}

.doubling-pulse {
    animation: doubling-expand 1s ease-out forwards !important;
}

/* Enhanced target projection with energy halo */
.target-projection::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 60%, rgba(200, 182, 255, 0.3) 70%, transparent 100%);
    animation: target-halo-pulse 3s infinite ease-in-out;
    z-index: -1;
    top: -10%;
    left: -10%;
}

@keyframes target-halo-pulse {
    0% { 
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% { 
        transform: scale(0.8);
        opacity: 0.3;
    }
}

/* Enhanced crystal projection with energy emanation */
.crystal-projection::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 50%, rgba(224, 170, 255, 0.4) 60%, rgba(224, 170, 255, 0.2) 80%, transparent 100%);
    animation: crystal-emanation 2s infinite ease-in-out;
    z-index: -1;
    top: -20%;
    left: -20%;
}

@keyframes crystal-emanation {
    0% { 
        transform: scale(0.6) rotate(0deg);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.4) rotate(180deg);
        opacity: 0.8;
    }
    100% { 
        transform: scale(0.6) rotate(360deg);
        opacity: 0.4;
    }
}

@keyframes crystal-carousel {
    0% { 
        opacity: 0;
        transform: scale(0.8) rotate(0deg);
    }
    15% { 
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    85% { 
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
    100% { 
        opacity: 0;
        transform: scale(0.8) rotate(360deg);
    }
}

.transmission-crystal-grid img {
    transition: all 0.3s ease;
}

.transmission-crystal-grid img:hover {
    transform: scale(1.1);
    filter: brightness(140%) saturate(170%) drop-shadow(0 0 15px rgba(224,170,255,1)) !important;
}

.session-management-section {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(16, 0, 43, 0.9), rgba(36, 0, 70, 0.9));
    border-radius: var(--border-radius);
    border: 2px solid rgba(224, 170, 255, 0.4);
    box-shadow: 0 0 25px rgba(224, 170, 255, 0.2);
}

.session-title {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(224, 170, 255, 0.5);
    display: flex;
    align-items: center;
}

.session-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.btn-session {
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(224, 170, 255, 0.2), rgba(224, 170, 255, 0.1));
    color: var(--accent-color);
    border: 2px solid rgba(224, 170, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

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

.btn-session:hover {
    background: linear-gradient(135deg, rgba(224, 170, 255, 0.4), rgba(224, 170, 255, 0.2));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(224, 170, 255, 0.4);
    border-color: var(--accent-color);
}

.btn-session.diagnostics {
    background: linear-gradient(135deg, rgba(66, 245, 135, 0.2), rgba(66, 245, 135, 0.1));
    color: var(--success-color);
    border-color: rgba(66, 245, 135, 0.4);
}

.btn-session.diagnostics:hover {
    background: linear-gradient(135deg, rgba(66, 245, 135, 0.4), rgba(66, 245, 135, 0.2));
    box-shadow: 0 8px 25px rgba(66, 245, 135, 0.4);
    border-color: var(--success-color);
}

.session-modal {
    display: none;
}

.confirmation-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(36, 0, 70, 0.95), rgba(60, 9, 108, 0.95));
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    font-weight: 500;
}

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

.confirmation-toast.success {
    border-left-color: var(--success-color);
}

.confirmation-toast.error {
    border-left-color: #ff4444;
}

.confirmation-toast.warning {
    border-left-color: #ffaa00;
}

.confirmation-toast.info {
    border-left-color: var(--accent-color);
}