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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.app-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.app-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orca-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand-title {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tv-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid #4a90e2;
    animation: fadeIn 0.5s ease-in;
}

.tv-name {
    color: #4a90e2;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tv-info p {
    color: #ccc;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header p {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.5;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.link-input {
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.link-input:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.link-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.submit-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status.show {
    opacity: 1;
}

.status.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status.error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Responsive design */
@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .tv-name {
        font-size: 1.3rem;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Loading animation */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Focus styles for accessibility */
.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.link-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
} 

/* Link History Styles */
.link-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.clear-history-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.clear-history-btn:hover {
    background: #c0392b;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    overflow: hidden;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 16px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-even {
    background: rgba(255, 255, 255, 0.05);
}

.history-item-odd {
    background: rgba(255, 255, 255, 0.02);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(4px);
}

.history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-link {
    margin-bottom: 4px;
}

.history-link a {
    color: #74b9ff;
    text-decoration: none;
    word-break: break-all;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-link a:hover {
    text-decoration: underline;
    color: #0984e3;
}

.history-time {
    color: #95a5a6;
    font-size: 12px;
    font-weight: 500;
}

/* Responsive design for history */
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .history-content {
        width: 100%;
    }
    
    .history-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Footer Styles */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-link {
    color: #95a5a6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #74b9ff;
    text-decoration: underline;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer {
        margin-top: 20px;
        padding: 15px 0;
    }
} 