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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

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

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

header h1 {
    color: #2c3e50;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #d0d0d0;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    font-family: monospace;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.button-group {
    display: flex;
    gap: 10px;
}

/* Status */
.status-success {
    color: #27ae60;
    font-weight: 500;
}

.status-error {
    color: #e74c3c;
    font-weight: 500;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.status-label {
    display: block;
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.status-value {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ddd;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.song-row {
    cursor: pointer;
    transition: background 0.2s;
}

.song-row:hover {
    background: #f8f9fa;
}

.no-data, .loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

#pageInfo {
    color: #7f8c8d;
}

/* List Header */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.list-header h2 {
    margin: 0;
}

.list-header input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Failures Table */
#failuresTable th:nth-child(4),
#failuresTable td:nth-child(4) {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#failuresTable td[title] {
    cursor: help;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal-body h3 {
    margin: 15px 0 10px;
    color: #2c3e50;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
}

.detail-label {
    font-weight: 500;
    min-width: 100px;
    color: #7f8c8d;
}

.link-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.link-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    font-family: monospace;
    font-size: 12px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    color: #2980b9;
    word-break: break-all;
    white-space: normal;
}

.link-input:hover {
    color: #1a5276;
    text-decoration: underline;
}

/* Cookie Display */
.cookie-display {
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #2c3e50;
    word-break: break-all;
    min-height: 40px;
}

/* Pagination Input */
.pagination input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Cookie Status Animation */
#cookieStatus {
    margin-left: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

#cookieStatus.status-success {
    color: #27ae60;
}

#cookieStatus.status-error {
    color: #e74c3c;
}

/* Logs Table */
.log-info {
    color: #3498db;
    font-weight: 500;
}

.log-warning {
    color: #f39c12;
    font-weight: 500;
}

.log-error {
    color: #e74c3c;
    font-weight: 500;
}

/* Search Page */
.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-header {
    margin-top: 15vh;
    margin-bottom: 40px;
    text-align: center;
}

.search-header h1 {
    font-size: 32px;
    color: #2c3e50;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #3498db;
}

.search-box .btn {
    padding: 14px 30px;
    font-size: 16px;
    border-radius: 8px;
}

.search-info {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.results-card {
    width: 100%;
}

.results-card table td:last-child {
    white-space: nowrap;
    color: #7f8c8d;
}
