/* ===== MODERN DARK THEME - ANALOGE UHR ===== */
:root {
    --primary-dark: #0a0a0a;
    --secondary-dark: #111111;
    --tertiary-dark: #1a1a1a;
    --accent-primary: #00ff88;
    --accent-secondary: #00ccff;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-tertiary: #444444;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Main Button - Minimalistischer Floating Button */
.clock-random-button {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary-dark);
    border: 1px solid var(--glass-border);
    color: var(--accent-primary);
    font-size: 22px;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.clock-random-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(0, 255, 136, 0.1) 0%, 
        rgba(0, 204, 255, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.clock-random-button:hover {
    transform: translateY(-50%) scale(1.1);
    border-color: var(--accent-primary);
    box-shadow: 
        0 12px 40px rgba(0, 255, 136, 0.2),
        0 0 0 1px rgba(0, 255, 136, 0.1);
}

.clock-random-button:hover::before {
    opacity: 1;
}

.clock-random-button:active {
    transform: translateY(-50%) scale(0.95);
    transition: transform 0.1s ease;
}

.clock-random-button i {
    margin: 2px 0;
    font-size: 18px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.clock-random-button:hover i:first-child {
    transform: translateY(-2px);
}

.clock-random-button:hover i:last-child {
    transform: translateY(2px);
}

/* Glowing Pulse Animation */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    }
    100% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }
}

.clock-random-button {
    animation: pulse-glow 3s infinite ease-in-out;
}

/* Overlay - Glass Morphism */
.clock-random-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clock-random-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Container - Glass Card */
.clock-random-container {
    width: 90%;
    max-width: 480px;
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Header */
.clock-random-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(
        90deg,
        rgba(0, 255, 136, 0.05) 0%,
        rgba(0, 204, 255, 0.05) 100%
    );
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.clock-random-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.clock-random-header h2 {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.clock-random-header h2 i {
    margin-right: 12px;
    color: var(--accent-primary);
    animation: icon-float 3s infinite ease-in-out;
}

@keyframes icon-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.clock-random-close {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.clock-random-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(90deg);
}

/* Sektionen */
.clock-section,
.random-section,
.external-link-section {
    padding: 30px;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.clock-section:last-child,
.random-section:last-child,
.external-link-section:last-child {
    border-bottom: none;
}

.clock-section h3,
.random-section h3,
.external-link-section h3 {
    font-size: 16px;
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.clock-section h3 i,
.random-section h3 i,
.external-link-section h3 i {
    margin-right: 12px;
    color: var(--accent-primary);
}

/* Analoge Uhr - Modern Design */
.analog-clock {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
    border-radius: 50%;
    background: var(--primary-dark);
    border: 2px solid var(--glass-border);
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease;
}

.analog-clock:hover {
    transform: scale(1.02);
}

.clock-face {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
}

/* Uhrzeiger mit Animation */
.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 2px;
    z-index: 10;
    transition: transform 0.05s cubic-bezier(0.1, 2.7, 0.58, 1);
}

.hour-hand {
    width: 4px;
    height: 50px;
    background: linear-gradient(to top, var(--accent-primary), transparent);
    transform: translateX(-50%);
    z-index: 8;
}

.minute-hand {
    width: 3px;
    height: 70px;
    background: linear-gradient(to top, var(--accent-secondary), transparent);
    transform: translateX(-50%);
    z-index: 9;
}

.second-hand {
    width: 1px;
    height: 85px;
    background: var(--accent-primary);
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    z-index: 11;
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.7),
        0 0 20px rgba(0, 255, 136, 0.3);
}

/* Uhr Zahlen - Minimalistisch */
.number {
    position: absolute;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    transform-origin: center;
}

.number-1 { top: 15%; right: 25%; }
.number-2 { top: 25%; right: 15%; }
.number-3 { 
    top: 50%; 
    right: 5%; 
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-weight: 400;
}
.number-4 { bottom: 25%; right: 15%; }
.number-5 { bottom: 15%; right: 25%; }
.number-6 { 
    bottom: 5%; 
    left: 50%; 
    transform: translateX(-50%);
    color: var(--accent-primary);
    font-weight: 400;
}
.number-7 { bottom: 15%; left: 25%; }
.number-8 { bottom: 25%; left: 15%; }
.number-9 { 
    top: 50%; 
    left: 5%; 
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-weight: 400;
}
.number-10 { top: 25%; left: 15%; }
.number-11 { top: 15%; left: 25%; }
.number-12 { 
    top: 5%; 
    left: 50%; 
    transform: translateX(-50%);
    color: var(--accent-primary);
    font-weight: 400;
}

/* Digitale Uhr - Neon Style */
.digital-time {
    text-align: center;
    font-size: 24px;
    font-weight: 300;
    font-family: 'Courier New', monospace;
    color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 24px;
    border-radius: 10px;
    display: inline-block;
    margin: 0 auto;
    letter-spacing: 3px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    animation: text-glow 2s infinite alternate;
}

@keyframes text-glow {
    from {
        text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    }
    to {
        text-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
    }
}

/* Zufallszahl Anzeige - Glowing Effect */
.random-number-display {
    font-size: 64px;
    font-weight: 300;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 
        0 0 10px rgba(0, 255, 136, 0.5),
        0 0 20px rgba(0, 255, 136, 0.3);
    margin: 25px 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
}

.random-number-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 136, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.random-number-display:hover::before {
    left: 100%;
}

.random-number-display:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 136, 0.2);
}

/* Generate Button - Modern */
.generate-random-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.generate-random-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 136, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.generate-random-btn:hover {
    background: rgba(0, 255, 136, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.1);
}

.generate-random-btn:hover::before {
    left: 100%;
}

.generate-random-btn:active {
    transform: translateY(0);
}

.generate-random-btn i {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.generate-random-btn:hover i {
    transform: rotate(180deg);
}

/* Number Info - Subtle */
.number-info {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 2px solid var(--accent-primary);
    line-height: 1.6;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* External Link - Glass Button */
.external-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 400;
    font-size: 15px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.external-link:hover {
    background: rgba(0, 255, 136, 0.05);
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.1);
}

.external-link i:first-child {
    margin-right: 12px;
    color: var(--accent-primary);
}

.external-link i:last-child {
    margin-left: 12px;
    transition: transform 0.3s ease;
}

.external-link:hover i:last-child {
    transform: translateX(5px);
}

.link-description {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .clock-random-button {
        width: 55px;
        height: 55px;
        right: 20px;
        font-size: 20px;
    }
    
    .clock-random-button i {
        font-size: 16px;
    }
    
    .clock-random-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .analog-clock {
        width: 180px;
        height: 180px;
    }
    
    .hour-hand { height: 45px; }
    .minute-hand { height: 65px; }
    .second-hand { height: 75px; }
    
    .random-number-display {
        font-size: 56px;
        padding: 25px;
    }
    
    .digital-time {
        font-size: 22px;
    }
    
    .clock-section h3,
    .random-section h3,
    .external-link-section h3 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .clock-random-button {
        width: 50px;
        height: 50px;
        right: 15px;
        font-size: 18px;
    }
    
    .clock-random-header {
        padding: 20px;
    }
    
    .clock-section,
    .random-section,
    .external-link-section {
        padding: 25px;
    }
    
    .analog-clock {
        width: 160px;
        height: 160px;
    }
    
    .hour-hand { height: 40px; }
    .minute-hand { height: 55px; }
    .second-hand { height: 65px; }
    
    .random-number-display {
        font-size: 48px;
    }
    
    .digital-time {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .generate-random-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* Scrollbar Styling */
.clock-random-container::-webkit-scrollbar {
    width: 6px;
}

.clock-random-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.clock-random-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.clock-random-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}