/* Claymorphism Video Clipper Styles */
:root {
    /* Color Palette */
    --primary-purple: #7B61FF;
    --accent-blue: #5AC8FA;
    --fuchsia-pink: #E061FF;
    --frosted-white: #F7F8FC;
    --clay-gray: #E6ECF6;
    --deep-navy: #192038;
    --medium-gray: #9CA3AF;
    --pure-white: #FFFFFF;
    
    /* Shadow Colors */
    --shadow-purple: rgba(123, 97, 255, 0.20);
    --shadow-blue: rgba(90, 200, 250, 0.14);
    --shadow-gray: rgba(25, 32, 56, 0.10);
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary-purple), var(--accent-blue));
    --soft-gradient: linear-gradient(135deg, var(--frosted-white), var(--clay-gray));
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--frosted-white);
    color: var(--deep-navy);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container-fluid {
    padding: 1.25rem;
    max-width: 1300px;
    margin: 0 auto;
}

/* Header Card */
.header-card {
    background: var(--pure-white);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 
        0 4px 20px var(--shadow-gray),
        0 1px 4px var(--shadow-purple);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.app-subtitle {
    color: var(--medium-gray);
    font-size: 1rem;
    margin: 0;
}

.user-badge {
    background: var(--clay-gray);
    color: var(--deep-navy);
    padding: 0.5rem 1rem;
    border-radius: 16px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Clay Cards */
.clay-card {
    background: var(--pure-white);
    border-radius: 16px;
    box-shadow: 
        0 4px 20px var(--shadow-gray),
        0 1px 4px var(--shadow-blue);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.clay-card:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 25px var(--shadow-gray),
        0 2px 8px var(--shadow-purple);
}

.card-header {
    background: var(--soft-gradient);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--deep-navy);
    margin: 0;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin: 0.25rem 0 0 0;
    font-weight: 400;
}

.card-body {
    padding: 1.25rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

/* Time Input Styles */
.timestamp-row {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    margin-bottom: 0.75rem;
    padding: 1.5rem;
    background: var(--frosted-white);
    border-radius: 16px;
    border: 2px solid var(--clay-gray);
}

.controls-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.audio-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-switch-sm .form-check-input {
    width: 2rem;
    height: 1rem;
}

.audio-toggle-group .form-check-label {
    font-size: 0.75rem;
    color: var(--deep-navy);
    margin-left: 0.5rem;
}

.time-group {
    flex: 1;
    min-width: 0;
    position: relative;
}

.time-group:first-child::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.time-label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin-bottom: 1rem;
}

.time-group:first-child .time-label {
    text-align: left;
}

.time-group:nth-child(2) .time-label {
    text-align: right;
}

.time-inputs {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.time-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.time-input {
    width: 60px;
    height: 60px;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 12px;
    border: 2px solid var(--clay-gray);
    background: var(--pure-white);
    color: var(--deep-navy);
    transition: all 0.3s ease;
}

.time-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px var(--shadow-purple);
    outline: none;
    background: var(--pure-white);
}

.time-input::placeholder {
    color: var(--medium-gray);
    font-weight: 500;
}

/* Remove number input spinners */
.time-input::-webkit-outer-spin-button,
.time-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-input[type=number] {
    -moz-appearance: textfield;
}

.time-unit {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delete-group {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timestamp-pair + .timestamp-pair {
    margin-top: 1rem;
}

/* Mobile responsiveness for time inputs */
@media (max-width: 768px) {
    .timestamp-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .time-group {
        flex: none;
    }
    
    .delete-group {
        align-items: center;
        justify-content: center;
    }
}

.form-label {
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
    display: block;
}

.clay-input {
    background: var(--clay-gray);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--deep-navy);
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 8px var(--shadow-gray);
}

.clay-input:focus {
    background: var(--pure-white);
    border-color: var(--primary-purple);
    box-shadow: 
        inset 2px 2px 8px var(--shadow-gray),
        0 0 0 3px var(--shadow-purple);
    outline: none;
}

.clay-input::placeholder {
    color: var(--medium-gray);
}

/* Select dropdown styling */
.form-select.clay-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select.clay-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%237c3aed' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Button Styles */
.btn {
    border-radius: 16px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--pure-white);
    box-shadow: 0 4px 16px var(--shadow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-purple);
    background: linear-gradient(135deg, #8B71FF, #6AB8FA);
}

.rip-button {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.rip-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rip-button:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: var(--pure-white);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: var(--pure-white);
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
}

.btn-outline-primary:hover {
    background: var(--primary-purple);
    color: var(--pure-white);
    transform: translateY(-1px);
}

/* Timestamp Pairs */
.timestamp-pair {
    background: var(--clay-gray);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: inset 2px 2px 8px var(--shadow-gray);
}

.timestamp-pair:last-child {
    margin-bottom: 0;
}

.remove-pair {
    height: 100%;
    min-height: 48px;
}

/* Clips List */
.clips-list {
    max-height: 600px;
    overflow-y: auto;
}

.clip-item {
    background: var(--clay-gray);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 8px var(--shadow-gray);
}

.clip-item:hover {
    background: var(--pure-white);
    box-shadow: 0 4px 16px var(--shadow-gray);
    transform: translateY(-1px);
}

.clip-info {
    flex: 1;
}

.clip-title {
    font-weight: 600;
    color: var(--deep-navy);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.clip-details {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.timestamp-badge {
    background: var(--primary-purple);
    color: var(--pure-white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.clip-date {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.clip-actions {
    display: flex;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--medium-gray);
}

.empty-state i {
    color: var(--accent-blue);
    opacity: 0.5;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 2rem;
}

.alert {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 16px var(--shadow-gray);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

/* SaaS Login Styles */
.saas-login-body {
    background: var(--frosted-white);
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.saas-login-container {
    display: flex;
    min-height: 100vh;
}

.saas-login-brand {
    flex: 1;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.saas-login-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.brand-content {
    position: relative;
    z-index: 2;
    color: var(--pure-white);
    max-width: 500px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-logo i {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.brand-logo span {
    font-size: 2rem;
    font-weight: 700;
}

.brand-tagline {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.brand-description {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.feature-item i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.saas-login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--pure-white);
}

.saas-login-card {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--medium-gray);
    font-size: 1rem;
}

.saas-login-form {
    margin-bottom: 2rem;
}

.saas-input {
    background: var(--frosted-white);
    border: 2px solid var(--clay-gray);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--deep-navy);
    transition: all 0.3s ease;
}

.saas-input:focus {
    background: var(--pure-white);
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px var(--shadow-purple);
    outline: none;
}

.saas-input::placeholder {
    color: var(--medium-gray);
}

.saas-login-button {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    color: var(--pure-white);
    transition: all 0.3s ease;
}

.saas-login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--shadow-purple);
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--clay-gray);
}

.security-note {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* Mobile responsiveness for SaaS login */
@media (max-width: 768px) {
    .saas-login-container {
        flex-direction: column;
    }
    
    .saas-login-brand {
        flex: none;
        padding: 2rem 1rem;
        min-height: 40vh;
    }
    
    .brand-tagline {
        font-size: 1.75rem;
    }
    
    .brand-description {
        font-size: 1rem;
    }
    
    .saas-login-form-side {
        flex: none;
        padding: 1rem;
    }
}

/* Legacy login styles for compatibility */
.login-body {
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: var(--pure-white);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 8px 32px var(--shadow-purple);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .header-card {
        padding: 1.5rem;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .clip-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .clip-actions {
        justify-content: center;
    }
}

/* Scrollbar Styling */
.clips-list::-webkit-scrollbar {
    width: 8px;
}

.clips-list::-webkit-scrollbar-track {
    background: var(--clay-gray);
    border-radius: 4px;
}

.clips-list::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 4px;
}

.clips-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.clay-card {
    animation: fadeIn 0.5s ease-out;
}

.clip-item {
    animation: fadeIn 0.3s ease-out;
}

/* Form Validation States */
.clay-input:invalid {
    border-color: var(--primary-purple);
    box-shadow: 
        inset 2px 2px 8px var(--shadow-gray),
        0 0 0 3px var(--shadow-purple);
}

.clay-input:valid {
    border-color: var(--primary-purple);
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
}
