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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: black;
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow: hidden;
}

body::before {
    content: 'CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED CENSORED ';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    color: rgba(255, 255, 255, 0.1);
    font-size: 3rem;
    font-weight: bold;
    line-height: 4rem;
    white-space: nowrap;
    z-index: -1;
    animation: scrollText 20s linear infinite;
    display: flex;
    align-items: center;
    transform: rotate(-15deg);
}

@keyframes scrollText {
    0% {
        transform: translateX(0) rotate(-15deg);
    }
    100% {
        transform: translateX(-50%) rotate(-15deg);
    }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.toolbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.file-input {
    display: none;
}

.upload-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.tool-btn.active {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border-color: #4facfe;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.controls label {
    font-weight: bold;
}

.controls input[type="range"] {
    width: 100px;
}

#brushSizeValue {
    min-width: 40px;
    font-weight: bold;
    color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.canvas-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#imageCanvas, #maskCanvas {
    display: block;
    position: relative;
    cursor: crosshair;
}

#imageCanvas {
    z-index: 1;
}

#maskCanvas {
    z-index: 2;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

.drop-zone {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 3px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.drop-zone.drag-over {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.drop-zone.hidden {
    display: none;
}

.drop-content {
    text-align: center;
    color: #666;
}

.drop-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.drop-content p {
    font-size: 1.2rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls {
        margin-left: 0;
        justify-content: center;
    }
    
    .tools {
        justify-content: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
}