:root {
    --primary: #00B894;
    --primary-hover: #55EFC4;
    --secondary: #55EFC4;
    --accent: #FDCB6E;
    --bg-dark: #0A1F1C;
    --bg-card: rgba(18, 45, 41, 0.8);
    --border: rgba(255, 255, 255, 0.1);
    --text: #FFFFFF;
    --text-muted: #B2BEC3;
    --glass: rgba(255, 255, 255, 0.05);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo i {
    color: var(--primary);
}

.actions {
    display: flex;
    gap: 12px;
}

button {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: var(--bg-dark);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.toolbar {
    width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    border-right: 1px solid var(--border);
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-group.bottom {
    margin-top: auto;
}

.toolbar button {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
}

.toolbar button.active {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

.canvas-area {
    flex: 1;
    background: #050f0e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: auto;
    position: relative;
}

.canvas-wrapper {
    background: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    cursor: crosshair;
}

#svg-canvas {
    display: block;
}

.properties {
    width: 280px;
    padding: 24px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
}

.properties h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

.prop-group label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.color-picker-wrapper {
    display: flex;
    gap: 8px;
}

input[type="color"] {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

input[type="text"], input[type="number"] {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
}

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}

#stroke-width-val, #opacity-val {
    font-size: 0.75rem;
    min-width: 40px;
}

.empty-state {
    padding: 24px;
    text-align: center;
    background: var(--glass);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.hidden {
    display: none !important;
}

.selected-element {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.canvas-settings {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Custom Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .properties {
        width: 240px;
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    .toolbar {
        width: 100%;
        height: 56px;
        flex-direction: row;
        padding: 0 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .tool-group {
        flex-direction: row;
    }
    .tool-group.bottom {
        margin-top: 0;
        margin-left: auto;
    }
    .properties {
        width: 100%;
        height: 300px;
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

/* Grid pattern */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(0, 184, 148, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 184, 148, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}
