:root {
    --primary-color: #267DD9;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
    min-height: 100vh;
}

/* Header Styles */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    padding: 12px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-link {
    display: block;
}

.logo {
    height: 32px;
    width: auto;
}

.login-button {
    background: rgba(38, 125, 217, 0.1);
    border: none;
    border-radius: 8px;
    color: #267DD9;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
}

.login-button.logged-in {
    background: none;
    border: none;
    color: #666;
    cursor: default;
    padding: 8px 16px;
    font-size: 14px;
}

.login-button.logged-in:hover {
    background: none;
}

/* Main Content Styles */
.main-content {
    padding: 80px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Survey Card Styles */
.survey-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    margin: 20px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    max-width: 800px;
}

.question {
    text-align: center;
}

.question h2 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin-bottom: 32px;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.option-button {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    background: #f8faff;
    color: #64748b;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-button:hover {
    background: #e0e7ff;
    color: #1e40af;
    border-color: #1e40af;
}

.option-button.selected {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.option-with-input {
    width: 100%;
}

.option-with-input .option-button {
    background: #f0f7ff;
    color: #267DD9;
    font-weight: 500;
    border-color: #267DD9;
}

.option-input {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    margin-top: 8px;
    font-size: 16px;
    display: none;
    background: white;
}

.option-with-input.active .option-input {
    display: block;
}

/* Welcome Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.welcome-modal {
    background: white;
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.modal-logo {
    width: 180px;
    height: auto;
    margin: 0 auto 32px;
}

.welcome-modal h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 16px;
}

.welcome-modal p {
    color: #666;
    margin-bottom: 24px;
}

.start-button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
}

.share-button {
    width: 100%;
    padding: 16px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
}

.terms-text {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Result Screen Styles */
.result-content {
    background: white;
    border-radius: 24px;
    padding: 32px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.result-content h2 {
    color: #267DD9;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.completion-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f4f8;
    padding: 8px 16px;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

/* AI Analysis Styles */
.ai-analysis {
    margin: 24px 0;
    padding: 24px;
    border-radius: 16px;
    background: #f8faff;
    text-align: left;
}

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

.analysis-header h3 {
    font-size: 18px;
    color: #333;
}

.analysis-status {
    font-size: 14px;
    color: #666;
}

.analysis-content {
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
}

.analysis-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.analysis-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: #e0e7ff;
    color: #1e40af;
    border-radius: 20px;
    font-size: 14px;
}

.analysis-loading {
    text-align: center;
    padding: 32px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #267DD9;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

.analysis-error {
    text-align: center;
    padding: 24px;
    color: #ef4444;
}

.analyze-button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
}

.analyze-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #a0aec0;
}

/* Auth Modal Styles */
.auth-modal {
    background: white;
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
}

.modal-logo {
    width: 60px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.auth-modal h2 {
    text-align: center;
    font-size: 28px;
    color: #333;
    font-weight: 600;
    margin-bottom: 32px;
}

/* Üst butonlar */
.auth-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: #267DD9;
    color: white;
}

/* Form alanları */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form input {
    width: 100%;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    color: #333;
    background: #f9fafb;
}

.auth-form input::placeholder {
    color: #9ca3af;
}

.auth-form input:focus {
    outline: none;
    border-color: #267DD9;
    background: white;
}

/* Submit butonları */
.auth-submit {
    width: 100%;
    padding: 16px;
    background: #267DD9;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease;
}

.auth-submit:hover {
    background: #2371c5;
}

/* Gizlilik metni */
.privacy-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 12px 0;
    line-height: 1.5;
}

.privacy-text a {
    color: #267DD9;
    text-decoration: none;
}

/* Şifremi unuttum linki */
.forgot-password {
    color: #267DD9;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    margin-top: 12px;
    display: block;
}

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

/* Screen States */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Error Message Styles */
.error-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #fee2e2;
    border: 1px solid #ef4444;
    padding: 12px 24px;
    border-radius: 10px;
    color: #991b1b;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.error-content {
    text-align: center;
}

.error-content p {
    margin: 0;
    font-weight: 500;
}

.error-content small {
    display: block;
    margin-top: 4px;
    opacity: 0.8;
}

@keyframes slideIn {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

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

.question-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    background: #f8faff;
    color: #333;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    margin-top: 8px;
}

.question-input:focus {
    outline: none;
    border-color: #267DD9;
    background: white;
}

.analysis-loading {
    text-align: center;
    padding: 32px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #267DD9;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

.error-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #fee2e2;
    border: 1px solid #ef4444;
    padding: 12px 24px;
    border-radius: 10px;
    color: #991b1b;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.error-content {
    text-align: center;
}

.error-content p {
    margin: 0;
    font-weight: 500;
}

.error-content small {
    display: block;
    margin-top: 4px;
    opacity: 0.8;
}

@keyframes slideIn {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

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

/* Surveys List Page Styles */
.surveys-list {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 60px auto 0;
}

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

.surveys-header h1 {
    font-size: 36px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.surveys-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Liste Grid Layout */
.surveys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Liste Card Styles */
.survey-list-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.survey-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.survey-list-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.survey-list-image {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
}

.survey-list-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.survey-list-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.survey-list-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    max-height: 50px;
}

.survey-list-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.survey-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.survey-list-author {
    font-size: 14px;
    color: #267DD9;
    font-weight: 500;
}

.survey-list-date {
    font-size: 14px;
    color: #888;
}

@media (max-width: 768px) {
    .surveys-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .survey-list-content h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .surveys-grid {
        grid-template-columns: 1fr;
    }

    .survey-list-image {
        height: 180px;
    }
}

/* Footer Styles */
.app-footer {
    background: white;
    padding: 24px 0;
    margin-top: 60px;
    border-top: 1px solid #eee;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .surveys-list {
        padding: 20px;
    }

    .surveys-header h1 {
        font-size: 28px;
    }

    .surveys-header p {
        font-size: 16px;
    }

    .surveys-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .survey-content {
        padding: 20px;
    }

    .survey-content h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .surveys-grid {
        grid-template-columns: 1fr;
    }

    .survey-image {
        height: 180px;
    }
}
