.screen {
    display: none;
}

.screen.active {
    display: block;
}

.setup-container {
    max-width: 700px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.setup-header {
    text-align: center;
    margin-bottom: 40px;
}

.setup-header h1 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.setup-header p {
    color: #666;
    font-size: 16px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-input,
.form-select {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    padding: 15px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-back-top {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
}

.btn-back-top:hover {
    background: #667eea;
    color: white;
}

.tournament-title-section {
    text-align: center;
    margin: 30px 0;
}

.tournament-title-section h1 {
    color: white;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* iPad 9-13 inch - compact title */
@media (min-width: 769px) and (max-width: 1366px) {
    .tournament-title-section {
        margin: 15px 0;
    }
    
    .tournament-title-section h1 {
        font-size: 24px;
    }
}

.form-section-title {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.form-section-title h3 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 15px;
}

.upload-container {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

.upload-preview {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-preview:hover {
    border-color: #5568d3;
    background: #e8f0fe;
}

.upload-preview.small {
    padding: 20px;
    min-height: 80px;
}

.upload-preview.has-image {
    border-style: solid;
    padding: 0;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.upload-preview.small img {
    max-height: 100px;
}

.upload-text {
    color: #667eea;
    font-weight: 600;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sponsor-upload-item {
    position: relative;
}

.sponsor-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.tournament-logo {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 200px;
    max-height: 150px;
    z-index: 1000;
    pointer-events: none;
}

.tournament-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.sponsor-image {
    position: fixed;
    width: 180px;
    height: 180px;
    z-index: 500;
    display: none;
}

.sponsor-image.active {
    display: block;
}

.sponsor-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* iPad 9-13 inch - smaller sponsors */
@media (min-width: 769px) and (max-width: 1366px) {
    .sponsor-image {
        width: 100px;
        height: 100px;
    }
    
    .sponsor-top-left {
        top: 10px;
        left: 10px;
    }
    
    .sponsor-top-right {
        top: 10px;
        right: 10px;
    }
}

/* Hide sponsors on mobile */
@media (max-width: 768px) {
    .sponsor-image {
        display: none !important;
    }
    
    .sponsor-image.active {
        display: none !important;
    }
}

.sponsor-top-left {
    top: 50px;
    left: 50px;
}

.sponsor-top-right {
    top: 50px;
    right: 50px;
}

.sponsor-bottom-left {
    bottom: 50px;
    left: 50px;
}

.sponsor-bottom-right {
    bottom: 50px;
    right: 50px;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-input {
    width: 80px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.color-label {
    font-family: monospace;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 10px 15px;
    background: #f0f0f0;
    border-radius: 5px;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .setup-container {
        padding: 20px;
        margin: 20px auto;
        max-height: none;
    }
    
    .setup-header h1 {
        font-size: 28px;
    }
    
    .setup-header p {
        font-size: 14px;
    }
    
    .setup-form {
        gap: 20px;
    }
    
    .form-input,
    .form-select {
        padding: 12px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .btn-back-top {
        position: fixed;
        top: 10px;
        right: 10px;
        padding: 10px 18px;
        font-size: 13px;
        z-index: 1000;
    }
    
    .tournament-title-section h1 {
        font-size: 28px;
    }
    
    .upload-preview {
        padding: 20px;
        min-height: 100px;
    }
    
    .upload-preview img {
        max-height: 150px;
    }
    
    .color-picker-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .color-input {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .setup-container {
        padding: 15px;
        margin: 10px auto;
    }
    
    .setup-header h1 {
        font-size: 24px;
    }
    
    .setup-header p {
        font-size: 13px;
    }
    
    .form-input,
    .form-select {
        padding: 10px;
        font-size: 13px;
    }
    
    .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-back-top {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .tournament-title-section h1 {
        font-size: 24px;
    }
}
