@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background: #000000;
    min-height: 100vh;
    padding: 20px;
    color: #00ff00;
    position: relative;
    overflow-x: hidden;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    color: #00ff00;
    margin-bottom: 50px;
    padding: 40px 20px;
    border: 2px solid #00ff00;
    background: rgba(0, 255, 0, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 0, 0.1),
        transparent
    );
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

header h1 {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #00ff00,
                 0 0 20px #00ff00,
                 0 0 30px #00ff00,
                 0 0 40px #00ff00;
    letter-spacing: 5px;
    position: relative;
    z-index: 1;
}

.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff, 2px 2px #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(54px, 9999px, 66px, 0); }
    40% { clip: rect(28px, 9999px, 92px, 0); }
    60% { clip: rect(42px, 9999px, 75px, 0); }
    80% { clip: rect(12px, 9999px, 89px, 0); }
    100% { clip: rect(68px, 9999px, 98px, 0); }
}

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00ff00;
    position: relative;
    z-index: 1;
}

.controls {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.add-url-container {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.url-input {
    flex: 1;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.url-input::placeholder {
    color: rgba(0, 255, 0, 0.5);
    opacity: 1;
}

.url-input:focus {
    background: rgba(0, 0, 0, 0.9);
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4),
                inset 0 0 10px rgba(0, 255, 255, 0.1);
    color: #00ffff;
}

.url-input:focus::placeholder {
    color: rgba(0, 255, 255, 0.3);
}

.add-url-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    white-space: nowrap;
}

.add-url-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: scale(1.05);
}

.add-url-btn:active {
    transform: scale(0.98);
}

.add-url-btn.loading {
    pointer-events: none;
}

.add-url-btn.loading .btn-text {
    opacity: 0;
}

.add-url-btn.loading .btn-loader {
    display: inline-block;
}

.refresh-btn {
    padding: 15px 40px;
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.refresh-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    transform: scale(1.05);
}

.refresh-btn:active {
    transform: scale(0.98);
}

.refresh-btn.loading {
    pointer-events: none;
}

.refresh-btn.loading .btn-text {
    opacity: 0;
}

.refresh-btn.loading .btn-loader {
    display: inline-block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #00ff00;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.scan-status,
.add-url-status {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    min-height: 25px;
    letter-spacing: 1px;
}

.scan-status.scanning,
.add-url-status.checking {
    animation: pulse 1s infinite;
}

.add-url-status.success {
    color: #00ff88;
    text-shadow: 0 0 5px #00ff88;
}

.add-url-status.error {
    color: #ff0088;
    text-shadow: 0 0 5px #ff0088;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.website-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3),
                inset 0 0 15px rgba(0, 255, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

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

.website-card:hover::before {
    left: 100%;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.6),
                inset 0 0 25px rgba(0, 255, 0, 0.1);
    border-color: #00ffff;
}

.preview-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #000;
    border-bottom: 2px solid #00ff00;
}

.website-preview {
    width: 100%;
    height: 100%;
    border: none;
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
    pointer-events: none;
    filter: brightness(0.8) contrast(1.2);
    opacity: 0.9;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none;
    border: 2px solid transparent;
}

.visit-text {
    color: #00ff00;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 10px #00ff00,
                 0 0 20px #00ff00;
    letter-spacing: 3px;
    font-family: 'Share Tech Mono', monospace;
}

.preview-link:hover .preview-overlay {
    background: rgba(0, 0, 0, 0.85);
    border-color: #00ff00;
}

.preview-link:hover .visit-text {
    opacity: 1;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.website-info {
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.website-name {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    letter-spacing: 1px;
    font-family: 'Share Tech Mono', monospace;
}

.website-domain {
    color: #00ff88;
    font-size: 0.9rem;
    font-family: 'Share Tech Mono', monospace;
    text-shadow: 0 0 3px #00ff88;
    letter-spacing: 1px;
}

.no-websites {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.no-websites p {
    font-size: 1.2rem;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    letter-spacing: 2px;
}

footer {
    text-align: center;
    color: #00ff00;
    padding: 30px 20px;
    opacity: 0.8;
    border-top: 1px solid rgba(0, 255, 0, 0.3);
    text-shadow: 0 0 5px #00ff00;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
        letter-spacing: 3px;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .add-url-container {
        flex-direction: column;
    }
    
    .add-url-btn {
        width: 100%;
    }
    
    .websites-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .preview-container {
        height: 200px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.website-card {
    animation: fadeIn 0.5s ease forwards;
}

.website-card:nth-child(1) { animation-delay: 0.1s; }
.website-card:nth-child(2) { animation-delay: 0.2s; }
.website-card:nth-child(3) { animation-delay: 0.3s; }
.website-card:nth-child(4) { animation-delay: 0.4s; }
.website-card:nth-child(5) { animation-delay: 0.5s; }
.website-card:nth-child(6) { animation-delay: 0.6s; }

/* Terminal-Style Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #00ff00;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffff;
    box-shadow: 0 0 15px #00ffff;
}

/* Settings Menü */
.settings-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.settings-toggle {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transition: all 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
    padding: 0;
    line-height: 1;
}

.settings-toggle:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.8);
    transform: translateX(-5px) scale(1.1);
}

.settings-panel.active ~ .settings-toggle,
.settings-menu.active .settings-toggle {
    transform: translateX(-250px);
}

.settings-panel {
    position: absolute;
    top: 0;
    right: 60px;
    width: 250px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff00;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 15px;
}

.settings-panel.active {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.settings-panel h3 {
    color: #00ff00;
    font-size: 1rem;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00ff00;
    margin-bottom: 10px;
    font-family: 'Share Tech Mono', monospace;
}

.opfer-alarm-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 2px solid #ff0088;
    color: #ff0088;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 136, 0.3);
    position: relative;
    overflow: hidden;
}

.opfer-alarm-btn:hover {
    background: rgba(255, 0, 136, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 136, 0.6);
    transform: scale(1.05);
}

.opfer-alarm-btn:active {
    transform: scale(0.98);
}

/* Windows Error Modal */
.windows-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.windows-error-modal.active {
    display: flex;
}

.error-box {
    background: #c0c0c0;
    border: 2px solid #000;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
    width: 400px;
    font-family: 'MS Sans Serif', sans-serif;
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-header {
    background: #000080;
    color: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

.error-icon {
    font-size: 1.2rem;
}

.error-content {
    padding: 20px;
    background: #c0c0c0;
    color: #000;
    font-size: 0.9rem;
    line-height: 1.5;
}

.error-buttons {
    padding: 10px;
    background: #c0c0c0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.error-btn {
    padding: 6px 20px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    cursor: pointer;
    font-size: 0.85rem;
    min-width: 75px;
}

.error-btn:hover {
    background: #d4d4d4;
}

.error-btn:active {
    border: 2px inset #c0c0c0;
}

/* Party Lichter */
#party-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5000;
    display: none;
}

#party-lights.active {
    display: block;
}

.party-light {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.6;
    animation: partyLightMove 3s infinite;
    filter: blur(20px);
}

@keyframes partyLightMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(100px, 100px) scale(1.2);
    }
    50% {
        transform: translate(-50px, 150px) scale(0.8);
    }
    75% {
        transform: translate(150px, -50px) scale(1.1);
    }
}

/* Fliegende Bilder */
#flying-images {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4000;
    overflow: hidden;
    display: none;
}

#flying-images.active {
    display: block;
}

.flying-image {
    position: absolute;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    animation: flyAround 10s infinite linear;
    border-radius: 10px;
    will-change: transform;
}

@keyframes flyAround {
    0% {
        transform: translate(75px, 75px) rotate(0deg) scale(1);
    }
    12.5% {
        transform: translate(calc(25vw - 75px), calc(10vh - 75px)) rotate(180deg) scale(1.1);
    }
    25% {
        transform: translate(calc(50vw - 75px), calc(20vh - 75px)) rotate(360deg) scale(1.2);
    }
    37.5% {
        transform: translate(calc(75vw - 75px), calc(40vh - 75px)) rotate(540deg) scale(0.9);
    }
    50% {
        transform: translate(calc(90vw - 75px), calc(60vh - 75px)) rotate(720deg) scale(0.8);
    }
    62.5% {
        transform: translate(calc(75vw - 75px), calc(80vh - 75px)) rotate(900deg) scale(1.0);
    }
    75% {
        transform: translate(calc(50vw - 75px), calc(90vh - 75px)) rotate(1080deg) scale(1.1);
    }
    87.5% {
        transform: translate(calc(25vw - 75px), calc(70vh - 75px)) rotate(1260deg) scale(1.05);
    }
    100% {
        transform: translate(75px, 75px) rotate(1440deg) scale(1);
    }
}

/* Party Mode Body */
body.party-mode {
    animation: partyShake 0.1s infinite;
}

@keyframes partyShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

body.party-mode .container {
    filter: hue-rotate(0deg);
    animation: colorShift 3s infinite;
}

@keyframes colorShift {
    0% { filter: hue-rotate(0deg); }
    33% { filter: hue-rotate(120deg); }
    66% { filter: hue-rotate(240deg); }
    100% { filter: hue-rotate(360deg); }
}
