/* Variables & Theme Design System */
:root {
    --bg-dark: #0a0a0c;
    --bg-card: rgba(22, 22, 29, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-gradient: linear-gradient(135deg, #8a2be2 0%, #ff007f 100%);
    --accent-glow: rgba(138, 43, 226, 0.3);
    
    --text-primary: #f3f3f6;
    --text-secondary: #9494a8;
    --sidebar-width: 260px;
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-hidden: hidden;
    height: 100vh;
    display: flex;
}

/* Background Glowing Accents */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.1) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: rgba(10, 10, 12, 0.95);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.logo-area h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #9494a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    background: transparent;
    border: none;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: #fff;
    background-color: rgba(138, 43, 226, 0.12);
    border-left: 3px solid #8a2be2;
    padding-left: calc(1rem - 3px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
}

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

.user-info .name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info .status-online {
    font-size: 0.75rem;
    color: #00ff88;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-info .status-online::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #00ff88;
    border-radius: 50%;
}

/* Main Content styling */
.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
    background: rgba(10, 10, 12, 0.3);
    backdrop-filter: blur(10px);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.content-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.content-header p {
    color: var(--text-secondary);
}

.badge {
    background-color: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Cards & Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(138, 43, 226, 0.3);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

/* Buttons */
.btn {
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.45);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Tab Navigation System */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* Creative output area styling */
.panel-output {
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}

.placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

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

.output-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-section h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.code-like-box {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.5;
}

.design-tip {
    background-color: rgba(138, 43, 226, 0.05);
    border-left: 4px solid #8a2be2;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Scheduler calendar list styling */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedule-item-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.schedule-item-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.schedule-item-tag {
    background-color: rgba(138, 43, 226, 0.15);
    color: #b175ff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Trigger / Rules list */
.trigger-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trigger-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trigger-keyword {
    background-color: rgba(255, 0, 127, 0.15);
    color: #ff54a9;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.85rem;
}

.max-w-md {
    max-width: 600px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
