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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.day-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.day-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.day-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.day-btn.active {
    background: #667eea;
    color: white;
}

/* Logo Section */
.logo-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.logo-section > label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
}

.logo-controls {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.logo-upload-area {
    flex: 0 0 160px;
}

.logo-placeholder {
    width: 160px;
    height: 120px;
    border: 2px dashed #b0b8c8;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    background: white;
    color: #888;
    font-size: 0.9em;
    gap: 6px;
}

.logo-placeholder:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f0f2ff;
}

.logo-icon {
    font-size: 2em;
}

.logo-preview-container {
    position: relative;
    width: 160px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #667eea;
    background: white;
}

.logo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.logo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-radius: 50%;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.logo-remove-btn:hover {
    background: #c82333;
}

.logo-options {
    flex: 1;
    min-width: 240px;
}

.logo-option-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    font-size: 0.92em;
}

.position-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.pos-btn {
    padding: 8px 12px;
    font-size: 0.88em;
    border: 2px solid #d0d5dd;
    background: white;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.pos-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.pos-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.opacity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.opacity-control input[type="range"] {
    flex: 1;
    accent-color: #667eea;
}

.opacity-control span {
    min-width: 42px;
    text-align: right;
    font-weight: 600;
    color: #555;
    font-size: 0.92em;
}

.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.help-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.events-list {
    margin-top: 30px;
    overflow-x: auto;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.events-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.events-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1em;
}

.events-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.events-table tbody tr:hover {
    background: #f8f9fa;
}

.events-table tbody tr:last-child td {
    border-bottom: none;
}

.time-input,
.name-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

.time-input:focus,
.name-input:focus {
    outline: none;
    border-color: #667eea;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    margin: 0;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.rounds-select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    background: white;
    min-width: 80px;
}

.rounds-select:focus {
    outline: none;
    border-color: #667eea;
}

.generate-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 30px auto;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.no-events {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1em;
}

.preview-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.preview-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.preview-controls {
    text-align: center;
    margin-bottom: 20px;
}

.pdf-preview {
    width: 100%;
    height: 600px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}
