* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.header-text {
    text-align: left;
}

.header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 5px;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

.container {
    display: flex;
    height: calc(100vh - 110px);
    gap: 0;
}

.control-panel {
    width: 320px;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.control-panel::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.section:last-child {
    border-bottom: none;
}

.section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group {
    margin-bottom: 12px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.control-group input[type="number"],
.control-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    background: white;
}

.control-group input[type="number"]:focus,
.control-group select:focus {
    outline: none;
    border-color: #667eea;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.control-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-btn {
    width: 100%;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.color-btn.active {
    border-color: #667eea;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #667eea;
    transform: scale(1.05);
}

.canvas-container {
    flex: 1;
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
}

#deckCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.stats {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.stats div {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.stats span {
    font-weight: 600;
    color: #667eea;
}

.info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.info h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.info ul {
    list-style: none;
    padding: 0;
}

.info li {
    padding: 5px 0;
    color: #555;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        max-height: 300px;
    }
    
    .canvas-container {
        height: calc(100vh - 410px);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 0.95rem;
    }
    
    .control-panel {
        padding: 15px;
    }
    
    .stats {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease;
}

/* Notification popup */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Canvas cursor */
#deckCanvas {
    cursor: default;
}
