/* OpenAI-inspiriertes Light-Theme für SEPP App */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #fafbfc;
    color: #111;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.main-layout {
    display: flex;
    min-height: 100vh;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1002;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.logo-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #222;
    text-decoration: none;
}

.logo-brand:hover {
    text-decoration: none;
    opacity: 0.8;
}

.sidebar {
    width: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-shadow: 2px 0 8px 0 rgba(60,60,60,0.03);
    transition: width 0.3s ease;
    overflow: hidden;
    position: relative;
    margin-top: 70px;
}

.sidebar.active {
    width: 280px;
}

.sidebar-content {
    width: 280px;
    padding: 32px 0 0 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 32px 32px 32px;
    border-bottom: 1px solid #f0f1f3;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #222;
    text-decoration: none;
    gap: 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0 0 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0 32px;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: block;
    color: #222;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover, .sidebar-nav .active > a {
    background: #f0f1f3;
    color: #10b981;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s ease;
    margin-top: 70px;
}

.btn-toggle {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-profile {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    background: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111;
    margin: 0;
}

.user-role {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 200px;
    display: none;
    z-index: 1000;
    margin-top: 8px;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: #f8f9fa;
    color: #10b981;
}

.user-dropdown button:hover {
    background: #f8f9fa;
    color: #10b981;
}

.user-dropdown .divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0 16px;
    }
    
    .logo-brand {
        font-size: 1.1rem;
    }
    
    .hero-content {
        padding: 32px 24px;
        gap: 30px;
        min-height: 260px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .content-area {
        padding: 20px 20px 40px 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .user-info {
        display: none;
    }
}

/* Mobile First - iPhone */
@media (max-width: 480px) {
    .top-bar {
        padding: 0 12px;
        height: 60px;
    }
    
    .main-content {
        margin-top: 60px;
    }
    
    .sidebar {
        margin-top: 60px;
    }
    
    .logo-brand {
        font-size: 1rem;
    }
    
    .logo-brand img {
        height: 30px !important;
    }
    
    .btn-toggle {
        padding: 8px;
        font-size: 1rem;
    }
    
    .content-area {
        padding: 16px;
        min-height: calc(100vh - 60px);
    }
    
    .hero-section {
        margin-bottom: 32px;
        border-radius: 16px;
    }
    
    .hero-section::before {
        width: 100%;
        opacity: 0.3;
    }
    
    .hero-content {
        padding: 24px 20px;
        min-height: 300px;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 32px;
    }
    
    .feature-card {
        padding: 20px;
        min-height: auto;
    }
    
    .feature-card h2 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.95rem;
    }
    
    .user-info {
        display: none;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .sidebar.active {
        width: 100%;
        position: fixed;
        z-index: 1003;
    }
    
    .code-section {
        padding: 20px;
    }

    .code-section pre {
        padding: 16px;
        font-size: 0.9rem;
    }

    .stats-section {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }
}

/* Tablet Portrait - iPad */
@media (min-width: 481px) and (max-width: 768px) {
    .top-bar {
        padding: 0 20px;
    }
    
    .content-area {
        padding: 24px;
    }
    
    .hero-content {
        padding: 32px 24px;
        min-height: 320px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .feature-card {
        padding: 28px;
    }
    
    .user-info {
        display: none;
    }
    
    .sidebar.active {
        width: 320px;
    }
}

/* Tablet Landscape - iPad Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-area {
        padding: 32px;
    }
    
    .hero-content {
        padding: 40px 32px;
    }
    
    .hero-text h1 {
        font-size: 2.3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 28px;
    }
    
    .user-info {
        display: flex;
    }
}

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) {
    .feature-card:hover {
        transform: none;
        box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    .user-avatar:hover {
        background: #10b981;
        box-shadow: none;
    }
    
    .sidebar-nav a:hover {
        background: #f0f1f3;
    }
}

/* Landscape orientation fix */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-content {
        min-height: 200px;
        padding: 20px;
    }
    
    .hero-text h1 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

h1, h2, h3, h4, h5, h6 {
    color: #111;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.content-area {
    flex: 1;
    padding: 40px 40px 40px 40px;
    background: #fafbfc;
    min-height: calc(100vh - 70px);
}

.hero-section {
    background: #000;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    padding: 0;
    margin-bottom: 48px;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('../img/fotorealistischer-astronaut-mit-mittlerer-aufnahme.jpg');
    background-size: cover;
    background-position: center;
    transform: scaleX(-1);
}

.hero-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 48px 40px;
    min-height: 400px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    text-align: left;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.2rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 32px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.feature-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.feature-icon {
    margin-bottom: 20px;
    padding: 16px;
    background: #f0fdf4;
    border-radius: 12px;
}

.feature-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.btn-primary {
    background: #10b981;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    color: white;
    text-decoration: none;
}

.code-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 32px;
}

.code-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
}

.code-section pre {
    background: #f6f8fa;
    border-radius: 12px;
    padding: 24px;
    font-size: 1.05rem;
    color: #222;
    overflow-x: auto;
    margin: 0;
    border: 1px solid #e5e7eb;
}

.stats-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 32px;
}

.stats-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

/* Chat Bubble */
.chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.chat-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066ff 0%, #10b981 50%, #004d9f 100%);
    border: none;
    cursor: pointer;
    box-shadow: 
        0 12px 40px rgba(16, 185, 129, 0.3),
        0 8px 24px rgba(0, 102, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.chat-button:hover {
    background: linear-gradient(135deg, #0052cc 0%, #059669 50%, #003d7a 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 16px 50px rgba(16, 185, 129, 0.4),
        0 12px 32px rgba(0, 102, 255, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 8px 32px rgba(16, 185, 129, 0.3),
        0 4px 16px rgba(0, 102, 255, 0.2);
}

.chat-button svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.chat-notification {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: subtlePulse 2s infinite ease-in-out;
}

@keyframes subtlePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.chat-window.active {
    display: flex;
    animation: elegantSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes elegantSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.95);
}
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: linear-gradient(135deg, #0066ff 0%, #10b981 50%, #004d9f 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.chat-avatar img,
.chat-message .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.chat-close:hover {
    background: rgba(255,255,255,0.1);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.chat-message.user .avatar {
    background: #6b7280;
}

.chat-message .content {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.user .content {
    background: #10b981;
    color: white;
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #10b981;
}

.chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #10b981;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chat-send:hover {
    background: #059669;
}

.chat-send:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Mobile Chat Bubble */
@media (max-width: 480px) {
    .chat-bubble {
        bottom: 16px;
        right: 16px;
    }
    
    .chat-button {
        width: 56px;
        height: 56px;
}

    .chat-button svg {
        width: 24px;
        height: 24px;
    }
    
    .chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: -8px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-input-area {
        padding: 12px 16px;
    }
} 