@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Demo Version - Johann Kupp mit modernem Demo-Look */
:root {
    --kupp-blue: #003D7A;
    --kupp-dark-blue: #002952;
    --kupp-burgundy: #8B1538;
    --demo-accent: #00D9FF;
    --demo-gradient-start: #00D9FF;
    --demo-gradient-end: #003D7A;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { overflow-x: hidden; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e8f0 100%);
    color: #1d1d1f;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    touch-action: pan-y;
    position: relative;
}

/* Demo Watermark */
body::before {
    content: 'DEMO';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 180px;
    font-weight: 900;
    color: rgba(0, 217, 255, 0.03);
    z-index: 0;
    pointer-events: none;
    letter-spacing: 20px;
}

.dark body {
    background: linear-gradient(135deg, #000814 0%, #001a28 100%);
    color: #f5f5f7;
}

.dark body::before {
    color: rgba(0, 217, 255, 0.05);
}

.app-container {
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header mit Demo-Badge */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 217, 255, 0.15);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--demo-accent), var(--kupp-blue)) 1;
}

.dark .app-header {
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 2px 20px rgba(0, 217, 255, 0.3);
}

/* Demo Badge im Header */
.app-header::after {
    content: 'DEMO';
    position: absolute;
    top: 8px;
    right: 80px;
    background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue));
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0, 217, 255, 0.4);
    animation: demo-pulse 2s ease-in-out infinite;
}

@keyframes demo-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 10px rgba(0, 217, 255, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(0, 217, 255, 0.6); }
}

.app-title {
    font-size: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-title::before {
    content: '';
    display: block;
    width: 180px;
    height: 70px;
    background: url('kupp-logo.png') no-repeat center;
    background-size: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 61, 122, 0.15));
}

.theme-btn {
    width: 38px;
    height: 38px;
    border: 2px solid var(--demo-accent);
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--kupp-blue);
}

.dark .theme-btn {
    background: rgba(26, 35, 50, 0.8);
    border-color: var(--demo-accent);
}

.theme-btn:hover { 
    background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue));
    color: white;
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.4);
}
.theme-btn:active { transform: scale(0.95); }

.app-main {
    flex: 1;
    padding: 8px 16px 24px;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.app-card {
    background: white;
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.12);
}

.dark .app-card {
    background: rgba(26, 35, 50, 0.8);
    backdrop-filter: blur(10px);
}

/* Animated gradient border for demo cards */
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue), var(--kupp-burgundy));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.app-card:hover::before {
    opacity: 1;
    animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3);
}

.card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card-num {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1;
    transition: all 0.3s ease;
}

.app-card:hover .card-num {
    transform: scale(1.2) rotate(-5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 217, 255, 0.4));
}

.status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 217, 255, 0.1);
    padding: 6px;
    border-radius: 50%;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--demo-accent);
    border-radius: 50%;
    animation: pulse-demo 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.8), 0 0 24px rgba(0, 217, 255, 0.4);
}

.app-card:hover .status-dot { 
    animation: pulse-fast-demo 0.8s ease-in-out infinite;
}

@keyframes pulse-demo {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px rgba(0, 217, 255, 0.8); }
    50% { opacity: 0.6; transform: scale(0.9); box-shadow: 0 0 20px rgba(0, 217, 255, 1); }
}

@keyframes pulse-fast-demo {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.3); }
}

.card-content { flex: 1; min-width: 0; }

.card-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.app-card:hover .card-title { 
    color: var(--demo-accent);
    transform: translateX(4px);
}

.card-desc {
    font-size: 13px;
    color: #86868b;
    font-weight: 500;
}

.card-arrow {
    color: #c7c7cc;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover .card-arrow {
    color: var(--demo-accent);
    transform: translateX(8px) scale(1.2);
}

/* Stats Bar mit Demo-Effekt */
.stats-bar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 217, 255, 0.2);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.dark .stats-bar {
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.9), rgba(15, 23, 42, 0.9));
    border-color: rgba(0, 217, 255, 0.3);
}

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

.stats-bar:hover::before {
    opacity: 1;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stats-bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 217, 255, 0.3);
    border-color: var(--demo-accent);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.stat-val {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stats-bar:hover .stat-val {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 217, 255, 0.3));
}

.stat-lbl {
    font-size: 11px;
    color: #86868b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 2px;
    height: 32px;
    background: linear-gradient(180deg, var(--demo-accent), var(--kupp-blue));
    opacity: 0.3;
    transition: all 0.3s ease;
}

.stats-bar:hover .stat-divider { 
    opacity: 1;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.ios-prompt {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue));
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 217, 255, 0.4);
}

.ios-prompt:not(.hidden) { transform: translateY(0); }
.ios-prompt-content { color: white; position: relative; }

.ios-prompt-content p {
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 600;
}

.ios-prompt-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ios-prompt-close {
    position: absolute;
    top: -4px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ios-prompt-close:hover { 
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
}

.fade-in { animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both; }

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

.hidden { display: none !important; }

@media (min-width: 768px) {
    .app-main { padding: 24px 32px 48px; max-width: 800px; }
    .app-header { padding: 20px 32px; }
    .cards-container { gap: 16px; }
    .app-card { padding: 24px; }
    .app-card:hover { transform: translateY(-12px) scale(1.03); }
    
    body::before {
        font-size: 240px;
    }
}

/* Extra: Demo Info Banner (optional) */
@media (min-width: 768px) {
    .app-main::before {
        content: '🚀 DEMO VERSION • Für Production kontaktieren Sie uns';
        display: block;
        text-align: center;
        padding: 12px 24px;
        background: linear-gradient(135deg, var(--demo-accent), var(--kupp-blue));
        color: white;
        font-size: 13px;
        font-weight: 700;
        border-radius: 12px;
        margin-bottom: 16px;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 16px rgba(0, 217, 255, 0.3);
        animation: slide-down 0.6s ease-out;
    }
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}