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

body {
    font-family: 'Kanit', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 20px;
    color: #34495e;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.form-container, .ticket-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Custom Select Styles */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Kanit', sans-serif;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-select select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.custom-select select:hover {
    border-color: #3498db;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #666;
    pointer-events: none;
    transition: transform 0.3s;
}

.custom-select select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select select option {
    padding: 10px;
    font-size: 16px;
    background-color: white;
    color: #333;
}

.custom-select select option:checked {
    background-color: #3498db;
    color: white;
}

.custom-select select option:hover {
    background-color: #f0f0f0;
}

/* Style for disabled placeholder */
.custom-select select option[value=""][disabled] {
    color: #999;
}

input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Kanit', sans-serif;
}

input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Custom file input */
.custom-file-input {
    display: flex;
    width: 100%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
}

.custom-file-input input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
}

.file-button {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.file-name {
    padding: 10px 15px;
    flex: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: #555;
}

.custom-file-input:hover .file-button {
    background-color: #2980b9;
}

.or-divider {
    text-align: center;
    margin: 10px 0;
    color: #888;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: "";
    display: inline-block;
    width: 40%;
    height: 1px;
    background-color: #ddd;
    position: absolute;
    top: 50%;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    font-family: 'Kanit', sans-serif;
}

button:hover {
    background-color: #2980b9;
}

/* Vertical Ticket Styles */
.ticket {
    position: relative;
    margin: 20px auto;
    width: 100%;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.vertical-ticket {
    max-width: 350px;
    min-height: 550px;
}

.ticket-header {
    background-color: #121b51;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.cinema-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cinema-logo svg {
    width: 80%;
    height: 80%;
}

.cinema-name {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
}

.ticket-divider {
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        #fff,
        #fff 10px,
        transparent 10px,
        transparent 20px
    );
    position: relative;
    z-index: 2;
}

.ticket-content {
    padding: 20px;
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.ticket-poster {
    flex: 0 0 150px;
    height: 0;
    padding-bottom: 225px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ticket-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ticket-details {
    flex: 1;
}

.ticket-details h3 {
    font-size: 20px;
    margin-bottom: 0;
    color: #2c3e50;
}

.ticket-details h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #7f8c8d;
    font-weight: 400;
}

.ticket-footer {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background-color: #f8f9fa;
}

.ticket-info {
    flex: 2;
}

.ticket-info p {
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}

.ticket-qr {
    flex: 1;
    text-align: right;
    background-color: white;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ticket-qr img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.ticket-stub {
    height: 40px;
    background-color: #f39c12;
    position: relative;
    margin-top: auto;
}

.ticket-stub::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        #fff,
        #fff 10px,
        transparent 10px,
        transparent 20px
    );
}

.ticket-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.tag {
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
}

@media (max-width: 768px) {
    .vertical-ticket {
        max-width: 300px;
    }
    
    .ticket-content {
        flex-direction: column;
    }
    
    .ticket-poster {
        width: 150px;
        height: 225px;
        padding-bottom: 0;
        margin: 0 auto;
    }
    
    .ticket-details {
        text-align: center;
    }
    
    .ticket-tags {
        justify-content: center;
    }
    
    .ticket-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .ticket-info {
        margin-bottom: 10px;
    }
    
    .ticket-qr {
        margin: 0 auto;
    }
    
    .ticket-qr img {
        width: 70px;
        height: 70px;
    }
}

#downloadBtn {
    margin-top: 15px;
    background-color: #27ae60;
}

#downloadBtn:hover {
    background-color: #2ecc71;
}

/* Genre Tags Styles */
.genre-tags-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.available-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    min-height: 60px;
}

.genre-tag {
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.genre-tag:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.genre-tag.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.selected-genres {
    position: relative;
    min-height: 45px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    background-color: white;
}

.selected-genres input {
    border: none;
    width: 100%;
    padding: 8px;
    font-size: 14px;
    color: #666;
    background: transparent;
}

.selected-genres input:focus {
    outline: none;
}

.selected-genres .genre-tag {
    margin: 2px;
    background-color: #3498db;
}

.selected-genres .genre-tag .remove-tag {
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    opacity: 0.7;
}

.selected-genres .genre-tag .remove-tag:hover {
    opacity: 1;
}

/* Drag and Drop Visual Feedback */
.selected-genres.drag-over {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

@media (max-width: 768px) {
    .available-tags {
        padding: 8px;
        gap: 6px;
    }

    .genre-tag {
        padding: 4px 10px;
        font-size: 13px;
    }
} 