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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    color: #fff;
    overflow: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(184, 51, 106, 0.15);
    border-bottom: 2px solid #F1D634;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    flex: 1;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.username-display {
    color: #F1D634;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    margin-right: 0;
}

#userContainer {
    display: flex !important;
    gap: 0.5rem;
    align-items: center;
}

.points-badge {
    background: rgba(241, 214, 52, 0.15);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #F1D634;
    color: #F1D634;
    white-space: nowrap;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #B8336A 0%, #7D1F3D 100%);
    color: #F1D634;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7D1F3D 0%, #5a1428 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 51, 106, 0.4);
}

.btn-secondary {
    background: rgba(184, 51, 106, 0.2);
    color: #F1D634;
    border: 1px solid #B8336A;
}

.btn-secondary:hover {
    background: rgba(184, 51, 106, 0.3);
}

.btn-mod {
    background: linear-gradient(135deg, #B8336A 0%, #7D1F3D 100%);
    color: #F1D634;
}

.btn-mod:hover {
    background: linear-gradient(135deg, #7D1F3D 0%, #5a1428 100%);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 20px;
}

.canvas-container {
    position: relative;
    width: 90%;
    max-width: 1920px;
    aspect-ratio: 16 / 9;
    overflow: visible;
    border: 2px solid rgba(241, 214, 52, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(241, 214, 52, 0.1);
}

#canvas {
    background: transparent;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

#canvas:active {
    cursor: grabbing;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(184, 51, 106, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #F1D634;
    transform: rotate(90deg);
}

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

/* Tab Styles */
.tab-btn {
    background: rgba(184, 51, 106, 0.1);
    border: none;
    color: white;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(184, 51, 106, 0.2);
}

.tab-btn.active {
    background: rgba(184, 51, 106, 0.3);
    border-bottom-color: #F1D634;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input[type="url"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="url"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input[type="url"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
}

.form-group input[type="url"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

#imagePreview {
    margin-top: 1rem;
    text-align: center;
}

#imagePreview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#uploadStatus {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

#uploadStatus.success {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid #4caf50;
    display: block;
}

#uploadStatus.error {
    background: rgba(244, 67, 54, 0.3);
    border: 1px solid #f44336;
    display: block;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}
