/* Hidden Console */
#hidden-console {
    position: fixed !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px !important;
    height: 400px !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 10px !important;
    z-index: 999999 !important;
    font-family: 'Courier New', monospace !important;
    overflow: hidden !important;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5) !important;
    pointer-events: auto !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
    color: var(--primary-color) !important;
}

.hidden {
    display: none !important;
}

.console-header {
    background: var(--primary-color) !important;
    color: var(--bg-primary) !important;
    padding: 0.5rem 1rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: bold !important;
    cursor: move !important;
    user-select: none !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

#console-close {
    background: none !important;
    border: none !important;
    color: var(--bg-primary) !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

.console-content {
    padding: 1rem !important;
    height: calc(100% - 50px) !important;
    display: flex !important;
    flex-direction: column !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

#console-output {
    flex: 1 !important;
    overflow-y: auto !important;
    margin-bottom: 1rem !important;
    color: var(--primary-color) !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

.console-input-line {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

.prompt {
    color: var(--primary-color) !important;
    font-weight: bold !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

#console-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: var(--primary-color) !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    outline: none !important;
    /* Rainbow Mode Schutz */
    filter: none !important;
    animation: none !important;
}

/* Konami Code Easter Egg */
#konami-easter-egg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.easter-egg-content {
    background: var(--bg-secondary);
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    animation: konamiPulse 1s ease-in-out;
}

.easter-egg-content h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
}

.secret-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.secret-features button {
    background: var(--primary-color);
    color: var(--bg-primary);
    border: none;
    padding: 1rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.secret-features button:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Digital Mode */
body.digital-mode #digital-canvas {
    opacity: 0.8;
}

body.digital-mode {
    color: #00ff00;
}

body.digital-mode .highlight {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

/* Rainbow Mode - Console-sicher */
body.rainbow-mode *:not(#hidden-console):not(#hidden-console *):not(.console-header):not(#console-close):not(.console-content):not(#console-output):not(.console-input-line):not(.prompt):not(#console-input):not(#console-toggle):not(.console-btn):not(.console-icon) {
    animation: rainbowText 3s infinite;
}

/* Rainbow Mode Hover Effects für interactive Elemente */
body.rainbow-mode nav a:hover,
body.rainbow-mode button:not(#console-toggle):not(#console-close):hover,
body.rainbow-mode .nav-logo:hover,
body.rainbow-mode .project-card:hover,
body.rainbow-mode .skill-item:hover,
body.rainbow-mode .tech-tag:hover,
body.rainbow-mode .highlight-item:hover,
body.rainbow-mode .social-link:hover,
body.rainbow-mode .project-link:hover {
    animation: rainbowGlow 2s infinite !important;
    transform: scale(1.05) !important;
    transition: transform 0.3s ease !important;
}

@keyframes rainbowText {
    0% { color: #ff0000; text-shadow: 0 0 5px #ff0000; }
    16% { color: #ff8000; text-shadow: 0 0 5px #ff8000; }
    33% { color: #ffff00; text-shadow: 0 0 5px #ffff00; }
    50% { color: #00ff00; text-shadow: 0 0 5px #00ff00; }
    66% { color: #0080ff; text-shadow: 0 0 5px #0080ff; }
    83% { color: #8000ff; text-shadow: 0 0 5px #8000ff; }
    100% { color: #ff0000; text-shadow: 0 0 5px #ff0000; }
}

@keyframes rainbowGlow {
    0% { 
        box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000;
        border-color: #ff0000;
    }
    16% { 
        box-shadow: 0 0 10px #ff8000, 0 0 20px #ff8000, 0 0 30px #ff8000;
        border-color: #ff8000;
    }
    33% { 
        box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00, 0 0 30px #ffff00;
        border-color: #ffff00;
    }
    50% { 
        box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
        border-color: #00ff00;
    }
    66% { 
        box-shadow: 0 0 10px #0080ff, 0 0 20px #0080ff, 0 0 30px #0080ff;
        border-color: #0080ff;
    }
    83% { 
        box-shadow: 0 0 10px #8000ff, 0 0 20px #8000ff, 0 0 30px #8000ff;
        border-color: #8000ff;
    }
    100% { 
        box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000;
        border-color: #ff0000;
    }
}

/* Hacker Mode */
body.hacker-mode {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
}

body.hacker-mode .highlight {
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

body.hacker-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1000;
}

/* Secret Click Counter */
.secret-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    z-index: 1000;
}

/* Hidden Messages */
.hidden-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--primary-color);
    padding: 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    text-align: center;
    z-index: 15000;
    animation: messageGlow 2s ease-in-out infinite alternate;
}

@keyframes messageGlow {
    from { box-shadow: 0 0 10px var(--primary-color); }
    to { box-shadow: 0 0 30px var(--primary-color); }
}

/* Secret Cursor */
body.secret-cursor {
    cursor: crosshair;
}

/* Easter Egg Animations */
@keyframes konamiPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Hidden Element Hover Effects */
.easter-egg-trigger {
    cursor: help;
    position: relative;
}

.easter-egg-trigger:hover::after {
    content: '👀';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: bounce 0.5s ease-in-out;
}

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

/* Secret Loading Animation */
.secret-loading {
    display: inline-block;
    animation: secretSpin 2s linear infinite;
}

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

/* Digital Rain Effect */
.digital-char {
    position: absolute;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    opacity: 0.8;
    animation: digitalFall 3s linear infinite;
}

@keyframes digitalFall {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Responsive Easter Eggs */
@media (max-width: 768px) {
    #hidden-console {
        width: 95% !important;
        height: 60vh !important;
        max-width: 500px !important;
        font-size: 0.9rem !important;
    }
    
    .console-header {
        padding: 1rem !important;
        font-size: 1rem !important;
        touch-action: manipulation;
    }
    
    #console-close {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.8rem !important;
        /* Größerer Touch-Target */
    }
    
    .console-content {
        padding: 1rem !important;
    }
    
    #console-output {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    #console-input {
        font-size: 1rem !important;
        padding: 0.5rem 0 !important;
        /* Größeres Touch-Target für Input */
    }
    
    .prompt {
        font-size: 1rem !important;
        min-width: 1.5rem !important;
    }
    
    .console-input-line {
        padding: 0.5rem 0 !important;
        /* Mehr Touch-Raum */
    }
    
    .easter-egg-content {
        padding: 2rem 1rem !important;
        margin: 1rem !important;
        width: 90% !important;
        max-width: 400px !important;
    }
    
    .secret-features button {
        padding: 1.2rem !important;
        font-size: 1rem !important;
        margin: 0.5rem 0 !important;
        /* Größere Touch-Targets */
        min-height: 48px;
        touch-action: manipulation;
    }
}

/* Tablet Optimierung */
@media (max-width: 1024px) and (min-width: 769px) {
    #hidden-console {
        width: 70% !important;
        height: 50vh !important;
        max-width: 600px !important;
    }
    
    .console-header {
        padding: 0.8rem 1rem !important;
    }
    
    #console-close {
        width: 35px !important;
        height: 35px !important;
        font-size: 1.6rem !important;
    }
}

/* Touch-optimierte Dragging-Zone */
@media (hover: none) and (pointer: coarse) {
    .console-header {
        padding: 1.2rem 1rem !important;
        /* Größere Drag-Zone für Touch */
        cursor: grab;
    }
    
    .console-header:active {
        cursor: grabbing;
    }
    
    /* Alle Touch-Targets vergrößern */
    .secret-features button,
    #console-close,
    .console-btn {
        min-height: 44px;
        min-width: 44px;
        /* Apple's empfohlene Touch-Target Größe */
        transition: transform 0.1s ease;
    }
    
    /* Touch-Feedback für Buttons */
    .secret-features button:active,
    #console-close:active,
    .console-btn:active {
        transform: scale(0.95);
    }
    
    /* Verbesserte Touch-Erkennung */
    .secret-features button {
        position: relative;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 255, 100, 0.3);
        /* tap-highlight-color: rgba(0, 255, 100, 0.3); - Nicht standardisiert */
    }
    
    /* Touch-optimierte Hover-States */
    .secret-features button:hover {
        background: rgba(0, 255, 100, 0.2) !important;
        box-shadow: 0 0 20px rgba(0, 255, 100, 0.5) !important;
    }
}