/* Material Design CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #212121;
    line-height: 1.5;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* App Bar */
.app-bar {
    background: #1976d2;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.app-bar-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-bar-title h1 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.app-bar-actions {
    display: flex;
    gap: 8px;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
}

/* Cards */
.welcome-card, .action-card, .list-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease;
}

.welcome-card:hover, .action-card:hover, .list-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.welcome-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.welcome-content p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.action-card {
    padding: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    border: none;
    text-align: left;
}

.action-card.primary {
    border-left: 4px solid #1976d2;
}

.action-card.voice {
    border-left: 4px solid #f44336;
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.action-card.primary .action-icon {
    background: #1976d2;
}

.action-card.voice .action-icon {
    background: #f44336;
}

.action-content h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #212121;
}

.action-content p {
    color: #757575;
    font-size: 0.875rem;
}

/* Lists Section */
.lists-section {
    margin-top: 32px;
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #212121;
}

.section-actions {
    display: flex;
    gap: 8px;
}

/* List Cards */
.list-card {
    padding: 0;
    overflow: hidden;
}

.list-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list-title h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 4px;
}

.list-date {
    color: #757575;
    font-size: 0.875rem;
}

.list-actions {
    display: flex;
    gap: 8px;
}

.list-content {
    padding: 16px 24px;
}

.list-reason {
    color: #757575;
    margin-bottom: 16px;
    font-style: italic;
}

.list-stats {
    display: flex;
    gap: 24px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #757575;
    font-size: 0.875rem;
}

.stat .material-icons {
    font-size: 18px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 36px;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.btn-outline {
    background: transparent;
    color: #1976d2;
    border: 1px solid #1976d2;
}

.btn-outline:hover {
    background: rgba(25, 118, 210, 0.04);
}

.btn-voice {
    background: #f44336;
    color: white;
    animation: pulse 2s infinite;
}

.btn-voice:hover {
    background: #d32f2f;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.icon-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.app-bar .icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* States */
.loading-state, .error-state, .empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #757575;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.empty-state h3 {
    color: #212121;
    margin-bottom: 8px;
    font-weight: 500;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #bdbdbd;
}

.error-state {
    color: #f44336;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #212121;
}

.modal-body {
    padding: 24px;
}

/* Voice Instructions */
.voice-instructions {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.voice-instructions h4 {
    color: #212121;
    margin-bottom: 12px;
    font-weight: 500;
}

.instruction-step {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #1976d2;
}

.instruction-step strong {
    color: #1976d2;
}

.instruction-step p {
    color: #757575;
    font-size: 0.875rem;
    margin-top: 4px;
    font-style: italic;
}

/* Voice Steps */
.voice-step {
    margin-bottom: 24px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 8px;
}

.voice-step h4 {
    color: #212121;
    margin-bottom: 16px;
    font-weight: 500;
}

.voice-step .btn {
    margin-right: 8px;
    margin-bottom: 8px;
}

.confirm-info {
    background: white;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
}

.confirm-info p {
    margin-bottom: 8px;
    color: #212121;
}

.confirm-info strong {
    color: #1976d2;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Voice Results */
.voice-result {
    margin-top: 16px;
}

.voice-transcript {
    margin-bottom: 12px;
}

.voice-transcript p {
    background: white;
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #4caf50;
    font-style: italic;
    color: #212121;
}

.voice-info {
    color: #757575;
    font-size: 0.875rem;
}

.voice-error {
    color: #f44336;
    background: #ffebee;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
}

/* Share Modal */
.share-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.share-option {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 8px;
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-icon.voice {
    background: #f44336;
}

.share-content {
    flex: 1;
}

.share-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 4px;
}

.share-content p {
    color: #757575;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.share-actions {
    display: flex;
    gap: 8px;
}

.url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
}

.url-input:focus {
    outline: none;
    border-color: #1976d2;
}

/* Snackbar */
.snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #323232;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.875rem;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.snackbar.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 16px 8px;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .list-actions {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .list-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .share-option {
        flex-direction: column;
        text-align: center;
    }
    
    .share-actions {
        flex-direction: column;
    }
    
    .confirm-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .app-bar-content {
        padding: 0 8px;
    }
    
    .app-bar-title h1 {
        font-size: 1rem;
    }
    
    .welcome-content h2 {
        font-size: 1.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
}

/* Homepage Styles */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0;
    margin-bottom: 64px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    color: #757575;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.voice-animation {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Features Section */
.features-section {
    margin-bottom: 64px;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 8px;
}

.feature-card p {
    color: #757575;
    line-height: 1.6;
}

/* How it works */
.how-it-works {
    margin-bottom: 64px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 48px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.step.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 500;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 4px;
}

.step-content p {
    color: #757575;
    font-size: 0.875rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 32px;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta-section .btn {
    background: white;
    color: #1976d2;
}

.cta-section .btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #212121;
    color: white;
    text-align: center;
    padding: 24px;
    margin-top: 64px;
}

.footer-content p {
    color: #bdbdbd;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .voice-animation {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 24px;
}

.login-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 32px;
    width: 100%;
    max-width: 400px;
}

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

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 8px;
}

.login-header p {
    color: #757575;
    font-size: 0.875rem;
}

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

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212121;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    color: #757575;
    font-size: 0.875rem;
}

.login-footer a {
    color: #1976d2;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 24px;
    }
}
