:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2a2a2a;
    --accent-color: #ff4b2b;
    --text-color: #f0f0f0;
    --text-muted: #888;
    --sidebar-width: 320px;
    --transition-speed: 0.3s;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Configurações do Menu Radial */
    --radial-size: 300px;
    --radial-color-start: #ff4b2b;
    --radial-color-end: #ff416c;
    --radial-hover-intensity: 0.2;
    --radial-animation: pop-in;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    color: var(--text-color);
    overflow: hidden;
}

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

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--secondary-bg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar header h1 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.sidebar header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.sidebar header a {
    color: var(--accent-color);
    text-decoration: none;
}

.config-group {
    margin-bottom: 2rem;
}

.config-group h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-field label {
    font-size: 0.85rem;
}

input[type="range"] {
    width: 100%;
}

input[type="color"] {
    width: 100%;
    height: 35px;
    border: none;
    background: transparent;
    cursor: pointer;
}

select {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--primary-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: inherit;
}

.actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.5rem;
}

.primary-btn,
.secondary-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
}

.primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

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

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

/* Preview Area */
.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2a2a2a 0%, #1a1a1a 100%);
    position: relative;
}

.instructions {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: absolute;
    bottom: 5rem;
}

/* Radial Menu Logic */
#radial-menu-wrapper {
    position: absolute;
    width: var(--radial-size);
    height: var(--radial-size);
}

#radial-menu-wrapper.menu-visible {
    opacity: 1;
    transform: scale(1) rotate(0);
    pointer-events: auto;
}

#radial-menu-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.menu-item {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.menu-item:hover {
    filter: brightness(calc(1 + var(--radial-hover-intensity)));
    transform: scale(1.05);
}

.menu-slice {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 0.5;
}

.menu-text {
    font-weight: 600;
    pointer-events: none;
    text-anchor: middle;
}

#close-btn {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

#close-btn:hover {
    transform: scale(1.1);
}

#close-circle {
    fill: #333;
    stroke: rgba(255, 255, 255, 0.2);
}

#close-x {
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* Animations */
@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.anim-pop-in {
    animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes rotate-in {
    0% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }

    100% {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

.anim-rotate-in {
    animation: rotate-in 0.5s ease-out;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.anim-bounce {
    animation: bounce 1s infinite;
}

.input-field-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.input-field-row input {
    flex: 1;
    padding: 0.4rem;
    background-color: var(--primary-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.8rem;
}

#close-circle {
    fill: #222;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
}

#close-x {
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
}

.main-footer {
    position: absolute;
    bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

.main-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}