:root {
    --teal: #4a4a4a;
    --teal-light: #f0f0f0;
    --teal-dark: #333333;
    --pink: #666666;
    --pink-light: #f5f5f5;
    --salmon: #555555;
    --green-soft: #999999;
    --purple-soft: #808080;
    --bg: #fafafa;
    --sidebar: #ffffff;
    --text: #1a1a1a;
    --text-muted: #999999;
    --border: #e0e0e0;
    --font-size: 18px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    font-size: var(--font-size);
    min-height: 100vh;
}

/* SIDEBAR */
#sidebar {
    width: 180px;
    min-width: 180px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: #446B9A;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    font-weight: 600;
    line-height: 1.3;
}

.logo-text span {
    display: block;
    color: var(--text-muted);
    font-weight: 400;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s;
    font-weight: 400;
    color: var(--text);
    position: relative;
}

.nav-item:hover {
    background: var(--bg);
}

.nav-item.active {
    background: #446B9A;
    color: white;
    font-weight: 500;
}

.nav-item.active .nav-icon img {
    filter: brightness(0) invert(1) !important;
}

.nav-item .nav-icon {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Roboto', monospace;
}

/* TOPBAR */
#topbar {
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 90;
}

.topbar-menu {
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}

/* API KEY BANNER */
#api-banner {
    background: #446B9A;
    border: 1px solid #cccccc;
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

#api-banner input {
    flex: 1;
    border: 1px solid #cccccc;
    padding: 7px 12px;
    font-family: 'Roboto', monospace;
    background: white;
    outline: none;
}

#api-banner button {
    background: #666666;
    color: white;
    border: none;
    padding: 7px 16px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

/* MAIN */
#main {
    margin-left: 220px;
    margin-top: 56px;
    flex: 1;
    padding: 40px;
    min-height: calc(100vh - 56px);
}

/* SCREENS */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* HOME SCREEN */
.home-hero {
    text-align: center;
    padding: 60px 20px 48px;
}

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

.home-hero h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.home-hero p {
    color: var(--text-muted);
}

.module-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.module-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 20px;
    width: 140px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.module-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 12px;
}

.module-card span {
    font-weight: 500;
    display: block;
}

/* MODULE SCREENS */
.screen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    background: white;
    border: 1px solid var(--border);
    padding: 6px 14px;
    transition: all 0.15s;
}

.back-btn:hover {
    background: var(--bg);
    color: var(--text);
}

/* BIG CIRCLE BUTTONS */
.circle-grid {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 48px 0;
    max-width: 600px;
    margin: 0 auto;
}

.circle-item {
    text-align: center;
    cursor: pointer;
}

.circle-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    margin: 0 auto 14px;
    transition: all 0.2s;
    box-shadow: 0 0 0 0 rgba(110, 231, 183, 0);
    position: relative;
}

.circle-btn::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.circle-item:hover .circle-btn {
    transform: scale(1.05);
}

.circle-item:hover .circle-btn.teal {
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.25);
}

.circle-item:hover .circle-btn.pink {
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.25);
}

.circle-item:hover .circle-btn.salmon {
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.25);
}

.circle-item:hover .circle-btn.green {
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.25);
}

.circle-label {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* GRADIENTS */
.grad-teal {
    background: #446B9A;
    color: white;
}

.grad-pink {
    background: #446B9A;
    color: white;
}

.grad-salmon {
    background: #446B9A;
    color: white;
}

.grad-green {
    background: #446B9A;
    color: white;
}

.grad-purple {
    background: #446B9A;
    color: white;
}

.grad-dark-teal {
    background: #446B9A;
    color: white;
}

/* FORM */
.form-card {
    background: white;
    padding: 32px;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.form-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group textarea,
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.15s;
    background: white;
}

.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: var(--teal);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-generate {
    width: 100%;
    padding: 14px;
    border: none;
    font-size: var(--font-size);
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-generate:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* RESULT AREA */
.result-area {
    margin-top: 24px;
    display: none;
}

.result-area.visible {
    display: block;
}

.result-box {
    font-size: var(--font-size);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 20px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.result-image {
    width: 100%;
    box-shadow: var(--shadow);
    margin-top: 8px;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-small {
    padding: 7px 16px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.15s;
}

.btn-small:hover {
    background: var(--bg);
}

/* VOICE RECORDER */
.voice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 0;
}

.voice-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #446B9A;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.voice-circle.recording {
    animation: pulse 1.2s ease-in-out infinite;
    background: #446B9A;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.35);
        transform: scale(1.03);
    }
}

.voice-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.voice-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.voice-dot.active {
    background: white;
}

.voice-status {
    font-weight: 500;
}

/* EMOCE - special sub cards */
.emoce-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
    padding: 32px 0;
}

/* GALERIE */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.gallery-card {
    background: white;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.gallery-card:hover {
    transform: translateY(-3px);
}

.gallery-thumb {
    height: 120px;
    background: #446B9A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.gallery-info {
    padding: 12px;
}

.gallery-info .g-type {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-info .g-text {
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.4;
}

.gallery-info .g-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* LOADING */
.loader {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.loader span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    animation: loader 0.8s ease-in-out infinite;
}

.loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.loader span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loader {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* NOTIFICATION */
.notif {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #333333;
    color: white;
    padding: 12px 20px;
    font-size: 13px;
    z-index: 999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
}

.notif.show {
    opacity: 1;
    transform: translateY(0);
}

input.input, textarea.input, select.input {
    color: #110f10;
    border-bottom: 1px solid #110f10;
    width: 100%;
    padding: 15px 0;
    font-size: var(--font-size);
    font-family: Roboto, sans-serif;
    font-weight: 400;
    line-height: 21px;
}