/* CSS Variables - using variables.css as base */
@import url('variables.css');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif);
    background: var(--bg-primary, #0f0f23);
    color: var(--text-primary, #ffffff);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Basic animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.3s ease forwards;
}

.slide-out-right {
    animation: slideOutRight 0.3s ease forwards;
}

/* Loading spinner */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color, #00d4aa);
    animation: spin 1s ease-in-out infinite;
}

/* Basic form elements */
.form-input,
.form-textarea,
.form-select {
    background: var(--bg-secondary, #1a1a2e);
    border: 1px solid var(--border-color, #333);
    color: var(--text-primary, #ffffff);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-color, #00d4aa);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Basic button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary, #1a1a2e);
    color: var(--text-primary, #ffffff);
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-hover, #252547);
    border-color: var(--accent-color, #00d4aa);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color, #00d4aa) 0%, #64ffda 100%);
    color: var(--text-dark, #0f0f23);
    border-color: var(--accent-color, #00d4aa);
    font-weight: 600;
}

.btn-accent {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    color: white;
    border-color: #ff6b6b;
    font-weight: 600;
}

.btn-secondary {
    background: var(--bg-tertiary, #2d2d44);
    border-color: var(--border-secondary, #444);
}

/* Form groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary, #b3b3cc);
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-tertiary, #666699);
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Basic layout styles */
.studio-container {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main";
    grid-template-columns: 320px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

.header {
    grid-area: header;
    background: var(--bg-secondary, #1a1a2e);
    border-bottom: 1px solid var(--border-color, #333);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar {
    grid-area: sidebar;
    background: var(--bg-secondary, #1a1a2e);
    border-right: 1px solid var(--border-color, #333);
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.main-area {
    grid-area: main;
    background: var(--bg-primary, #0f0f23);
    overflow-y: auto;
    height: calc(100vh - 60px);
}

/* Responsive sidebar collapse */
.studio-container.sidebar-collapsed {
    grid-template-columns: 0 1fr;
}

.studio-container.sidebar-collapsed .sidebar {
    width: 0;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .studio-container {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    .studio-container {
        grid-template-areas: 
            "header"
            "main";
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -320px;
        top: 60px;
        width: 320px;
        height: calc(100vh - 60px);
        transition: left 0.3s ease;
        z-index: 200;
    }
    
    .studio-container.sidebar-open .sidebar {
        left: 0;
    }
}