* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100%;
}

body.login-page {
    height: 100vh;
    overflow: hidden;
}

html.login-page {
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 60px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #007bff;
}

.auth-menu {
    position: fixed;
    right: 20px;
    top: calc(1rem + 30px);
    transform: translateY(-50%);
    z-index: 1001;
}

.login-btn {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.login-btn:hover {
    background-color: #333;
    color: #fff;
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: relative;
    display: inline-block;
}

.user-info-trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-info-trigger:hover {
    background-color: #f5f5f5;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: #666;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1002;
}

.user-menu-dropdown:hover .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
    color: #c33;
}

.user-dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.user-dropdown-menu a:last-child:hover {
    background-color: #fee;
}

/* Login Page Styles */
body.login-page main {
    height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    margin: 0;
}

.login-container {
    max-width: 600px;
    width: 100%;
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.login-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form .form-group:nth-last-child(2),
.login-form .form-group:last-child {
    grid-column: 1 / -1;
}

.login-form .submit-btn {
    grid-column: 1 / -1;
    max-width: 200px;
    margin: 0 auto;
    background-color: #007bff;
}

.login-form .submit-btn:hover {
    background-color: #0056b3;
}

/* Register form düzeni */
.register-form {
    grid-template-columns: 1fr 1fr;
}

.register-form .form-group:first-child {
    grid-column: 1 / -1;
}

.register-form .form-group:nth-child(2),
.register-form .form-group:nth-child(3) {
    grid-column: span 1;
}

.register-form .form-group:nth-child(4),
.register-form .form-group:nth-child(5) {
    grid-column: span 1;
}

.register-form .submit-btn {
    grid-column: 1 / -1;
    max-width: 200px;
    margin: 0 auto;
    background-color: #007bff;
}

.register-form .submit-btn:hover {
    background-color: #0056b3;
}

/* Şifre göster/gizle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    user-select: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.submit-btn {
    padding: 0.75rem 2rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    width: auto;
}

.submit-btn:hover {
    background-color: #0056b3;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.register-link p {
    color: #666;
    font-size: 0.9rem;
}

.register-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Blog Styles */
.blog-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.blog-header h1 {
    margin: 0;
    font-size: 2rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-post {
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
}

.blog-post-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.blog-post-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.blog-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #666;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-author strong {
    color: #333;
}

.blog-author-role {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-author-role.yeni-uye {
    background-color: #e3f2fd;
    color: #1976d2;
}

.blog-author-role.yazar {
    background-color: #fff3e0;
    color: #f57c00;
}

.blog-author-role.admin {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.blog-date {
    color: #999;
}

.blog-content {
    line-height: 1.6;
    color: #444;
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.blog-content.expanded {
    max-height: none;
}

.blog-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}

.blog-content.expanded::after {
    display: none;
}

.read-more-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    cursor: pointer;
}

.read-more-link:hover {
    text-decoration: underline;
}

.blog-footer {
    padding-top: 0.5rem;
    border-top: none;
    margin-bottom: 0;
}

.blog-comments-count {
    color: #666;
    font-size: 0.85rem;
}

.blog-comments-count a {
    color: #007bff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: color 0.3s;
}

.blog-comments-count a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.blog-comments.active .toggle-icon {
    transform: rotate(180deg);
}

/* Blog Comments */
.blog-comments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.blog-comments h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 2px solid #e0e0e0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.comment-author strong {
    color: #333;
}

.comment-author-role {
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.comment-author-role.yeni-uye {
    background-color: #e3f2fd;
    color: #1976d2;
}

.comment-author-role.yazar {
    background-color: #fff3e0;
    color: #f57c00;
}

.comment-author-role.admin {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.comment-date {
    color: #999;
    font-size: 0.8rem;
}

.comment-content {
    color: #444;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 0.85rem;
}

.comment-form {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.comment-form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #007bff;
}

.comment-login-required {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fff3cd;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}

.comment-login-required a {
    color: #007bff;
    text-decoration: none;
}

.comment-login-required a:hover {
    text-decoration: underline;
}

.no-comments {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

/* Blog Write Page */
.blog-write-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.blog-write-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.blog-write-container h1 {
    margin: 0 0 2rem 0;
    font-size: 1.8rem;
}

.blog-write-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-write-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.blog-write-form input[type="text"],
.blog-write-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.blog-write-form textarea {
    resize: vertical;
    min-height: 300px;
}

.blog-write-form input:focus,
.blog-write-form textarea:focus {
    outline: none;
    border-color: #007bff;
}

.form-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Hesabım Sayfası */
.hesabim-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.hesabim-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hesabim-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: #333;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.hesabim-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 600;
    color: #666;
    min-width: 150px;
}

.info-item span {
    color: #333;
}

.hesabim-tarihce {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tarihce-item {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.tarihce-text {
    color: #333;
    font-size: 1rem;
}

.hesabim-blog-list,
.hesabim-yorum-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hesabim-blog-item,
.hesabim-yorum-item {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.hesabim-blog-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.hesabim-blog-item h3 a {
    color: #007bff;
    text-decoration: none;
}

.hesabim-blog-item h3 a:hover {
    text-decoration: underline;
}

.blog-meta-small {
    color: #999;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 0.5rem 0 0 0;
}

.yorum-header-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.yorum-blog-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.yorum-blog-link a:hover {
    text-decoration: underline;
}

.yorum-date-small {
    color: #999;
    font-size: 0.85rem;
}

.yorum-content-small {
    color: #444;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.empty-message {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Şifre Değiştir Sayfası */
.sifre-degistir-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.sifre-degistir-container {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sifre-degistir-container h1 {
    margin: 0 0 2rem 0;
    font-size: 1.8rem;
}

.sifre-degistir-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.sifre-degistir-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sifre-degistir-form .form-group:last-of-type,
.sifre-degistir-form .form-actions {
    grid-column: 1 / -1;
}

.sifre-degistir-form .form-group label {
    font-weight: 500;
    color: #333;
}

.sifre-degistir-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.sifre-degistir-form input:focus {
    outline: none;
    border-color: #007bff;
}

.sifre-degistir-form small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

/* Hesabım Sayfası */
.hesabim-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.hesabim-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hesabim-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: #333;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.hesabim-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.info-item span {
    color: #333;
    font-size: 1rem;
}

.role-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.role-badge.role-yeni-uye {
    background-color: #e3f2fd;
    color: #1976d2;
}

.role-badge.role-yazar {
    background-color: #fff3e0;
    color: #f57c00;
}

.role-badge.role-admin {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Hesap Tarihçesi */
.hesap-tarihce {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tarihce-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.tarihce-icon {
    font-size: 1.5rem;
}

.tarihce-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tarihce-content strong {
    color: #333;
    font-size: 1rem;
}

.tarihce-tarih {
    color: #666;
    font-size: 0.9rem;
}

/* Blog ve Yorum Listeleri */
.hesabim-blog-list,
.hesabim-yorum-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hesabim-blog-item {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.hesabim-blog-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.hesabim-blog-item h3 a {
    color: #333;
    text-decoration: none;
}

.hesabim-blog-item h3 a:hover {
    color: #007bff;
}

.blog-meta-small {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hesabim-yorum-item {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.yorum-blog-link {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.yorum-blog-link a {
    color: #007bff;
    text-decoration: none;
}

.yorum-blog-link a:hover {
    text-decoration: underline;
}

.yorum-content {
    color: #444;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
}

.yorum-date {
    font-size: 0.85rem;
    color: #999;
}

.empty-message {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Şifre Değiştir Sayfası */
.sifre-degistir-main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.sifre-degistir-container {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sifre-degistir-container h1 {
    margin: 0 0 2rem 0;
    font-size: 1.8rem;
}

.sifre-degistir-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.sifre-degistir-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sifre-degistir-form .form-group:last-of-type,
.sifre-degistir-form .form-actions {
    grid-column: 1 / -1;
}

.sifre-degistir-form .form-group label {
    font-weight: 500;
    color: #333;
}

.sifre-degistir-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.sifre-degistir-form input:focus {
    outline: none;
    border-color: #007bff;
}

.sifre-degistir-form small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Footer */
body:not(.login-page) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body:not(.login-page) main {
    flex: 1;
}

.main-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.main-footer p {
    margin: 0;
    font-size: 0.9rem;
}