/* Base styles matching Squishl.ink theme */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    color: #333;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 2.5em;
    margin: 0;
    background: linear-gradient(45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    margin: 10px 0 0;
    color: #666;
    font-size: 1.1em;
}

.stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.total-count {
    background: linear-gradient(45deg, #23a6d5, #23d5ab);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
}

.logout-btn {
    background: linear-gradient(45deg, #e73c7e, #ee7752);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: transform 0.2s;
}

.logout-btn:hover {
    transform: translateY(-2px);
}

/* Messages */
.messages {
    margin-bottom: 20px;
}

.message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: 500;
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    color: #16a34a;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    color: #dc2626;
}

/* Login Form */
.login-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #23a6d5;
    box-shadow: 0 0 0 3px rgba(35, 166, 213, 0.1);
}

/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.search-form {
    display: flex;
    justify-content: center;
}

.search-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #23a6d5;
}

.search-select {
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

/* Buttons */
.btn-primary, .btn-search, .btn-clear, .btn-danger, .btn-delete {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(45deg, #23a6d5, #23d5ab);
    color: white;
}

.btn-search {
    background: linear-gradient(45deg, #ee7752, #e73c7e);
    color: white;
}

.btn-clear {
    background: #6b7280;
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
}

.btn-delete {
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-primary:hover, .btn-search:hover, .btn-clear:hover, 
.btn-danger:hover, .btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Table Section */
.table-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.links-table th,
.links-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}

.links-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.links-table tr:hover {
    background: rgba(35, 166, 213, 0.05);
}

.alias-cell {
    font-weight: 600;
}

.alias-link {
    color: #23a6d5;
    text-decoration: none;
    font-weight: 600;
}

.alias-link:hover {
    text-decoration: underline;
}

.url-cell {
    max-width: 400px;
}

.url-link {
    color: #666;
    text-decoration: none;
    word-break: break-all;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-link:hover {
    color: #23a6d5;
    text-decoration: underline;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats {
        align-items: center;
        margin-top: 20px;
    }
    
    .search-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .links-table {
        font-size: 14px;
    }
    
    .links-table th,
    .links-table td {
        padding: 8px 4px;
    }
    
    .url-cell {
        max-width: 200px;
    }
}
