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

input,
button,
textarea,
select {
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

button {
    cursor: pointer;
}

:root {
    --color-primary: #ff4d00;
    --color-secondary: #ffcc00;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-edit: #3b82f6;
    --color-info: #3b82f6;
    --color-warning: #facc15;
    --color-special: #a855f7;
    --color-text: #e0e0e0;
    --color-text-muted: #e2e4e7;
    --bg-dark-primary: #1a1a1a;
    --bg-dark-secondary: #0a0a0f;
    --bg-panel: rgba(17, 24, 39, 0.7);
    --bg-card: rgba(31, 41, 55, 0.8);
    --border-color: #4b5563;
    --border-color-hover: #f97316;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 8px rgba(255, 77, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 16px rgba(255, 77, 0, 0.7);
    }
    100% {
        box-shadow: 0 0 8px rgba(255, 77, 0, 0.4);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

body {
    background: radial-gradient(circle at center, var(--bg-dark-secondary) 0%, var(--bg-dark-primary) 45%, #28241e 100%);
    color: var(--color-text);
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.modal-open {
    overflow: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(245, 166, 35, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(245, 166, 35, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: -1;
}

#app-container {
    width: 100%;
    max-width: 1152px;
    background-color: var(--bg-panel);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#panel-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.gradient-border {
    border: 5px solid;
    border-image: linear-gradient(135deg, #ff0022, var(--color-primary), var(--color-secondary)) 1;
}

.gradient-text {
    background: linear-gradient(135deg, #ff0022, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hidden {
    display: none !important;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #fff;
}

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

.button i {
    margin-right: 0.5rem;
}

.button.small {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.button.icon-only {
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
}

.button.icon-only i {
    margin: 0;
}

.primary-button {
    background-color: var(--color-primary);
}

.primary-button:hover:not(:disabled) {
    background-color: #c2410c;
}

.secondary-button {
    background-color: #374151;
}

.secondary-button:hover:not(:disabled) {
    background-color: #4b5563;
}

.danger-button,
.button.error {
    background-color: var(--color-danger);
    animation: shake 0.5s;
}

.danger-button:hover:not(:disabled),
.button.error:hover:not(:disabled) {
    background-color: #c43333;
}

.success-button {
    background-color: var(--color-success);
}

.success-button:hover:not(:disabled) {
    background-color: #16a34a;
}

.ghost-button {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
}

.ghost-button:hover:not(:disabled) {
    background-color: rgba(31, 41, 55, 0.7);
    border-color: var(--border-color-hover);
    color: var(--color-text);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.form-input {
    width: 100%;
    background-color: #374151;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--border-color-hover);
    border-color: var(--border-color-hover);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.card-style {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

main > .card-style:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title .icon {
    margin-right: 0.75rem;
    color: var(--border-color-hover);
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.success-alert {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.danger-alert {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-text {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.placeholder-text {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.site-footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.devsyon-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.devsyon-link:hover {
    color: var(--color-secondary);
}

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 10px;
    border: 2px solid var(--bg-dark-secondary);
    opacity: 0.6;
}

::-webkit-scrollbar-thumb:hover {
    opacity: 1;
}

@media (min-width: 768px) {
    body {
        padding: 2rem;
    }
    #app-container {
        padding: 2rem;
    }
    #panel-header {
        flex-direction: row;
        align-items: center;
    }
}

.form-input.error {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
}