/* ============================================
   RAINBOW THEME - Pure Vibrancy & Chaos
   ============================================ */

html[data-theme="rainbow"] {
    --primary: #ff00ff;
    --primary-dark: #ff0080;
    --primary-light: #ff00ff;
    --secondary: #00ffff;
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #ffff00;
    --border: #00ff00;
    --success: #00ff00;
    --error: #ff0080;
    --warning: #ffaa00;
}

html[data-theme="rainbow"] {
    background: linear-gradient(45deg, #0a0a0a 0%, #0a0a0a 100%);
    background-attachment: fixed;
}

html[data-theme="rainbow"] * {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

html[data-theme="rainbow"] body {
    background: transparent;
    padding: 20px 10px;
    position: relative;
    overflow-x: hidden;
    animation: rainbow-pulse-bg 3s ease-in-out infinite;
}

@keyframes rainbow-pulse-bg {
    0% { background-color: rgba(10, 10, 10, 1); }
    25% { background-color: rgba(30, 10, 30, 0.5); }
    50% { background-color: rgba(10, 30, 30, 0.5); }
    75% { background-color: rgba(30, 30, 10, 0.5); }
    100% { background-color: rgba(10, 10, 10, 1); }
}

html[data-theme="rainbow"] #app {
    max-width: 500px;
    position: relative;
    z-index: 1;
}

/* Logo Header - Same Style with Rainbow Glow */
html[data-theme="rainbow"] div[style*="background: var(--bg-primary); border-radius: 16px"] {
    background: linear-gradient(135deg, #1a0a2e 0%, #2d0a2e 50%, #0a1a2e 100%) !important;
    border: 2px solid !important;
    border-color: #ff00ff !important;
    border-radius: 16px !important;
    box-shadow: 
        0 0 30px #ff00ff,
        0 0 60px #00ffff,
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    animation: rainbow-glow 2s ease-in-out infinite;
}

@keyframes rainbow-glow {
    0% { border-color: #ff00ff; box-shadow: 0 0 30px #ff00ff, 0 0 60px #00ffff; }
    25% { border-color: #00ffff; box-shadow: 0 0 30px #00ffff, 0 0 60px #ff00ff; }
    50% { border-color: #00ff00; box-shadow: 0 0 30px #00ff00, 0 0 60px #ffff00; }
    75% { border-color: #ffff00; box-shadow: 0 0 30px #ffff00, 0 0 60px #ff00ff; }
    100% { border-color: #ff00ff; box-shadow: 0 0 30px #ff00ff, 0 0 60px #00ffff; }
}

html[data-theme="rainbow"] .container {
    background: linear-gradient(135deg, rgba(26, 10, 46, 0.95) 0%, rgba(46, 10, 26, 0.9) 100%);
    border: 2px solid;
    border-color: #00ffff;
    border-radius: 16px;
    padding: 32px 24px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 40px rgba(255, 0, 255, 0.4),
        0 0 80px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: rainbow-border 3s linear infinite;
}

@keyframes rainbow-border {
    0% { border-color: #ff00ff; }
    20% { border-color: #00ffff; }
    40% { border-color: #00ff00; }
    60% { border-color: #ffff00; }
    80% { border-color: #ff00ff; }
    100% { border-color: #ff00ff; }
}

html[data-theme="rainbow"] .container::before {
    display: none;
}

html[data-theme="rainbow"] h1,
html[data-theme="rainbow"] h2,
html[data-theme="rainbow"] h3 {
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: 
        0 0 10px #ff00ff,
        0 0 20px #00ffff,
        0 0 30px #00ff00;
    margin-top: 0;
    animation: rainbow-text 2s ease-in-out infinite;
}

@keyframes rainbow-text {
    0% { color: #ff00ff; text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff0080; }
    25% { color: #00ffff; text-shadow: 0 0 10px #00ffff, 0 0 20px #0080ff; }
    50% { color: #00ff00; text-shadow: 0 0 10px #00ff00, 0 0 20px #ffff00; }
    75% { color: #ffff00; text-shadow: 0 0 10px #ffff00, 0 0 20px #ff8800; }
    100% { color: #ff00ff; text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff0080; }
}

html[data-theme="rainbow"] h1 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 28px;
}

html[data-theme="rainbow"] h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

html[data-theme="rainbow"] h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

html[data-theme="rainbow"] .upload-zone {
    border: 3px dashed;
    border-color: #ff00ff;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.05) 0%, rgba(0, 255, 255, 0.05) 100%);
    border-radius: 12px;
    padding: 40px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: rainbow-pulse 2s ease-in-out infinite;
}

@keyframes rainbow-pulse {
    0%, 100% { border-color: #ff00ff; box-shadow: 0 0 20px rgba(255, 0, 255, 0.3); }
    25% { border-color: #00ffff; box-shadow: 0 0 30px rgba(0, 255, 255, 0.5); }
    50% { border-color: #00ff00; box-shadow: 0 0 30px rgba(0, 255, 0, 0.5); }
    75% { border-color: #ffff00; box-shadow: 0 0 30px rgba(255, 255, 0, 0.5); }
}

html[data-theme="rainbow"] .upload-zone::before {
    display: none;
}

html[data-theme="rainbow"] .upload-zone:hover {
    border-color: #00ff00;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
    transform: scale(1.02);
}

html[data-theme="rainbow"] .upload-zone.dragover {
    border-color: #ffff00;
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.15) 0%, rgba(255, 0, 255, 0.15) 100%);
    box-shadow: 
        0 0 40px rgba(255, 255, 0, 0.6),
        inset 0 0 30px rgba(255, 255, 0, 0.1);
    transform: scale(1.05);
}

html[data-theme="rainbow"] .upload-zone.dragover .upload-text {
    color: #ffff00;
    animation: bounce-text 0.5s ease-in-out infinite;
}

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

html[data-theme="rainbow"] .upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    text-align: center;
    animation: spin-rainbow 3s linear infinite;
}

@keyframes spin-rainbow {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

html[data-theme="rainbow"] .upload-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    transition: color 0.3s ease;
    line-height: 1.4;
    animation: rainbow-text-cycle 2s ease-in-out infinite;
}

@keyframes rainbow-text-cycle {
    0% { color: #ff00ff; }
    25% { color: #00ffff; }
    50% { color: #00ff00; }
    75% { color: #ffff00; }
    100% { color: #ff00ff; }
}

html[data-theme="rainbow"] .file-selected-info {
    margin-top: 16px;
}

html[data-theme="rainbow"] .file-selected-name {
    color: #00ff00;
    font-weight: 900;
    word-break: break-word;
    margin-bottom: 6px;
    font-size: 14px;
    text-shadow: 0 0 10px #00ff00;
    animation: glow-pulse-name 1.5s ease-in-out infinite;
}

@keyframes glow-pulse-name {
    0%, 100% { text-shadow: 0 0 10px #00ff00; }
    50% { text-shadow: 0 0 20px #00ff00, 0 0 30px #ffff00; }
}

html[data-theme="rainbow"] .file-selected-size {
    color: #ffff00;
    font-size: 13px;
    text-shadow: 0 0 8px #ffff00;
}

html[data-theme="rainbow"] input[type="password"],
html[data-theme="rainbow"] input[type="text"] {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    color: #00ffff;
    border: 2px solid #ff00ff;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-shadow: 0 0 5px #00ffff;
}

html[data-theme="rainbow"] input[type="password"]::placeholder,
html[data-theme="rainbow"] input[type="text"]::placeholder {
    color: rgba(0, 255, 255, 0.5);
}

html[data-theme="rainbow"] input[type="password"]:focus,
html[data-theme="rainbow"] input[type="text"]:focus {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2) 0%, rgba(0, 255, 255, 0.2) 100%);
    border-color: #00ffff;
    outline: none;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 40px rgba(255, 0, 255, 0.3);
}

html[data-theme="rainbow"] .form-group {
    margin-bottom: 20px;
}

html[data-theme="rainbow"] label {
    display: block;
    color: #ffff00;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px #ffff00;
}

html[data-theme="rainbow"] button {
    width: 100%;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #00ff00, #ffff00, #ff00ff);
    background-size: 200% 100%;
    border: 2px solid #ffffff;
    color: #000000;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 900;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3);
    font-family: inherit;
    animation: rainbow-gradient 2s ease infinite, pulse-glow 1.5s ease-in-out infinite;
}

@keyframes rainbow-gradient {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(255, 0, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.6); }
}

html[data-theme="rainbow"] button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 0 40px rgba(255, 0, 255, 0.8),
        0 0 80px rgba(0, 255, 255, 0.6);
}

html[data-theme="rainbow"] button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3);
}

html[data-theme="rainbow"] button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
    transform: none;
}

html[data-theme="rainbow"] .btn-primary {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #00ff00, #ffff00, #ff00ff);
    background-size: 200% 100%;
    width: 100%;
    text-align: center;
}

html[data-theme="rainbow"] .btn-primary:hover {
    background-position: 100% center;
}

html[data-theme="rainbow"] .btn-secondary {
    background: linear-gradient(90deg, #00ffff, #00ff00, #ffff00, #ff00ff, #00ffff);
    background-size: 200% 100%;
}

html[data-theme="rainbow"] .btn-secondary:hover {
    background-position: 100% center;
}

html[data-theme="rainbow"] .button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

html[data-theme="rainbow"] .button-group button {
    flex: 1;
    width: 100%;
}

html[data-theme="rainbow"] .status {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 900;
    border: 2px solid;
    background: rgba(255, 0, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: status-pulse 1.5s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 0, 255, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 0, 255, 0.6); }
}

html[data-theme="rainbow"] .status.success {
    border-color: #00ff00;
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 8px #00ff00;
}

html[data-theme="rainbow"] .status.error {
    border-color: #ff0080;
    color: #ff0080;
    background: rgba(255, 0, 128, 0.1);
    text-shadow: 0 0 8px #ff0080;
}

html[data-theme="rainbow"] .status.loading {
    border-color: #ffff00;
    color: #ffff00;
    background: rgba(255, 255, 0, 0.1);
    text-shadow: 0 0 8px #ffff00;
}

html[data-theme="rainbow"] .share-link {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    word-break: break-all;
    font-size: 13px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

html[data-theme="rainbow"] .copy-hint {
    font-size: 12px;
    color: #ffff00;
    text-align: center;
    margin-top: 8px;
    text-shadow: 0 0 3px #ffff00;
}

html[data-theme="rainbow"] .file-info {
    background: linear-gradient(135deg, rgba(46, 10, 46, 0.8) 0%, rgba(10, 46, 46, 0.8) 100%);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
    animation: glow-shift 3s ease-in-out infinite;
}

@keyframes glow-shift {
    0% { border-color: #ff00ff; box-shadow: 0 0 25px rgba(255, 0, 255, 0.3); }
    50% { border-color: #00ffff; box-shadow: 0 0 35px rgba(0, 255, 255, 0.5); }
    100% { border-color: #ff00ff; box-shadow: 0 0 25px rgba(255, 0, 255, 0.3); }
}

html[data-theme="rainbow"] .file-info p {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #ffff00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px #ffff00;
}

html[data-theme="rainbow"] .file-name {
    color: #00ff00;
    font-weight: 900;
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    word-break: break-word;
    text-shadow: 0 0 10px #00ff00;
    animation: wobble 1s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: skewX(0deg); }
    25% { transform: skewX(-2deg); }
    75% { transform: skewX(2deg); }
}

html[data-theme="rainbow"] .file-name span:first-child {
    font-size: 40px;
    animation: rotate-spin 2s linear infinite;
}

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

html[data-theme="rainbow"] .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid transparent;
    border-top-color: #ffff00;
    border-right-color: #ff00ff;
    border-bottom-color: #00ffff;
    border-left-color: #00ff00;
    border-radius: 50%;
    animation: spin-colors 1s linear infinite;
}

@keyframes spin-colors {
    0% { transform: rotate(0deg); border-top-color: #ffff00; }
    33% { border-top-color: #ff00ff; }
    66% { border-top-color: #00ffff; }
    100% { transform: rotate(360deg); border-top-color: #ffff00; }
}

html[data-theme="rainbow"] .home-link,
html[data-theme="rainbow"] .back-link {
    text-align: center;
    margin-top: 20px;
}

html[data-theme="rainbow"] .home-link a,
html[data-theme="rainbow"] .back-link a {
    color: #ff00ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px #ff00ff;
}

html[data-theme="rainbow"] .home-link a:hover,
html[data-theme="rainbow"] .back-link a:hover {
    color: #00ffff;
    text-shadow: 0 0 15px #00ffff, 0 0 30px #ff00ff;
    transform: scale(1.1);
}

html[data-theme="rainbow"] .theme-btn {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3) 0%, rgba(0, 255, 255, 0.3) 100%) !important;
    border: 2px solid #ff00ff !important;
    color: #ffffff !important;
    padding: 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 900 !important;
    transition: all 0.3s ease !important;
    font-size: 12px !important;
    animation: button-glow 2s ease-in-out infinite !important;
    text-shadow: 0 0 5px currentColor !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 70px !important;
    white-space: normal !important;
    word-break: break-word !important;
}

@keyframes button-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 255, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4); }
}

html[data-theme="rainbow"] .theme-btn:hover {
    border-color: #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.8), 0 0 40px rgba(255, 0, 255, 0.6);
    transform: translateY(-2px);
}

html[data-theme="rainbow"] .theme-btn.active {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #00ff00, #ffff00, #ff00ff);
    background-size: 200% 100%;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.8),
        0 0 60px rgba(0, 255, 255, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: rainbow-gradient 2s ease infinite, pulse-glow 1.5s ease-in-out infinite;
}

html[data-theme="rainbow"] .theme-close-btn {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.5) 0%, rgba(255, 0, 255, 0.5) 100%);
    border: 2px solid #00ffff;
    color: #000000;
    font-weight: 900;
}

html[data-theme="rainbow"] .theme-close-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.8) 0%, rgba(255, 0, 255, 0.8) 100%);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

html[data-theme="rainbow"] .warning-box {
    background: rgba(255, 255, 0, 0.15);
    border: 2px solid #ffff00;
    color: #ffff00;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-shadow: 0 0 8px #ffff00;
    font-weight: 700;
    animation: warning-glow 1s ease-in-out infinite;
}

@keyframes warning-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 0, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.8); }
}

html[data-theme="rainbow"] .info-text {
    color: #00ffff;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    text-shadow: 0 0 5px #00ffff;
}

/* Fade transition for theme changes */
html[data-theme="rainbow"] .fade-transition {
    animation: rainbow-fade 0.3s ease;
}

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