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

:root {
  --primary-blue: #007bff;
  --primary-blue-rgb: 0,123,255; 
  --secondary-green: #28a745;
  --dark-text: #343a40;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --white-color: #ffffff;
  --medium-gray: #6c757d;
  --light-gray: #adb5bd;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto; 
  overflow: hidden;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-text);
  margin-bottom: 0.75em; 
}

h1 {
  font-size: 2.2em; 
}

h2 {
  font-size: 1.8em;
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 10px;
  margin-bottom: 25px; 
}

section h2 { 
  color: var(--primary-blue);
  margin-top: 0;
}


p {
  font-size: 1em; 
  margin-bottom: 1em;
  color: var(--medium-gray);
}

header {
  background: var(--white-color); 
  color: var(--dark-text); 
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color); 
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); 
}

.navbar .container {
  display: flex;
  justify-content: center; 
  align-items: center;
}

.logo {
  color: var(--primary-blue); 
  text-decoration: none;
  font-size: 1.9em;
  font-weight: bold;
  text-shadow: none; 
}

main {
  padding: 25px 0; 
}

section {
  margin-bottom: 35px; 
  padding: 25px; 
  background: var(--white-color);
  border-radius: 10px; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
}

#featured-apps { 
    margin-top: 30px;
}

section h2 {
  color: #333;
  margin-top: 0;
  border-bottom: 2px solid #0779e4;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.app-item {
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0; 
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  cursor: pointer;
}

.app-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
}

.app-item-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.app-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.app-item img.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 10px; 
  margin-right: 12px;
  border: 1px solid var(--border-color);
  object-fit: cover; 
}

.app-item-info {
    flex-grow: 1;
    min-width: 0; 
}

.app-item h3 {
  font-size: 1.2em; 
  margin-bottom: 4px;
  color: var(--dark-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-item .app-category {
    font-size: 0.85em;
    color: var(--medium-gray);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-item .star-rating {
  font-size: 0.9em;
  color: #ffc107; 
  margin-bottom: 10px;
}

.app-item .app-description-preview {
    font-size: 0.9em;
    color: var(--medium-gray);
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    line-clamp: 2; 
    -webkit-box-orient: vertical;
}

.app-item-actions {
    padding: 12px 15px; 
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-item .price {
  font-size: 1.05em; 
  font-weight: bold;
  color: var(--secondary-green);
}

.app-item .btn-install {
  background-color: var(--secondary-green);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px; 
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.app-item .btn-install:hover {
  background-color: #1e7e34; 
  transform: scale(1.05);
}

footer {
  background: var(--dark-text);
  color: var(--light-gray); 
  text-align: center;
  padding: 25px 0; 
  margin-top: 35px; 
  font-size: 0.9em;
}

#app-banner-placeholder {
  height: 300px; 
  background-color: var(--light-gray); 
  background-size: cover;
  background-position: center;
  position: relative; 
  margin-bottom: 20px;
}

#app-banner-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--primary-blue-rgb), 0.1); 
}

.app-detail-header {
  display: flex;
  align-items: flex-start; 
  margin-bottom: 30px; 
  padding: 20px;
  background-color: var(--white-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.app-detail-header-content {
    display: flex; 
    align-items: flex-start; 
    width: 100%;
}

.app-detail-icon {
  width: 120px; 
  height: 120px;
  margin-right: 25px; 
  border-radius: 12px; 
  object-fit: cover; 
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.app-detail-main-info {
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
}

.app-detail-main-info h1 {
  font-size: 2em; 
  color: var(--dark-text);
  margin-bottom: 8px; 
}

.app-meta-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px; 
    gap: 15px; 
}

.app-category, .app-version {
  font-size: 0.95em;
  color: var(--medium-gray);
  background-color: #e9ecef;
  padding: 3px 8px;
  border-radius: 4px;
}

.app-rating-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px; 
}

.app-detail-main-info .app-rating {
  display: flex;
  align-items: center;
  font-size: 1em;
  color: var(--medium-gray);
}

.app-detail-main-info .app-rating .stars {
  color: #ffc107; 
  margin-right: 8px;
  font-size: 1.2em; 
}

.app-price-tag {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--secondary-green);
    margin-left: auto; 
}

.app-detail-actions {
  margin-top: 15px; 
  display: flex; 
}

.main-download-btn {
  background-color: var(--primary-blue);
  color: var(--white-color);
  text-decoration: none;
  padding: 12px 25px; 
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: bold;
  display: inline-flex; 
  align-items: center;
  gap: 8px; 
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  border: none; 
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(var(--primary-blue-rgb), 0.3);
}

.main-download-btn svg {
  width: 20px;
  height: 20px;
}

.main-download-btn:hover {
  background-color: #0056b3; 
  box-shadow: 0 4px 8px rgba(var(--primary-blue-rgb), 0.4);
}

#app-details-container > section, 
#app-details-container > .tabs-container { 
  padding: 25px;
  margin-bottom: 25px;
  background-color: var(--white-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.card-style-section {
  background-color: var(--white-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.app-media h2, 
.tab-pane h3    
{
  font-size: 1.6em; 
  color: var(--dark-text);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 15px;
}
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
  gap: 15px; 
  margin-bottom: 20px; 
}
.screenshots-grid img {
  width: 100%; 
  height: auto; 
  border-radius: 8px; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

.app-media .screenshots-grid + h3 { 
    margin-top: 20px; 
}

.tab-nav {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.tab-link {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background-color: transparent;
  font-size: 1.1em;
  color: var(--medium-gray);
  position: relative;
  transition: color 0.2s ease;
  margin-right: 5px; 
}

.tab-link:hover {
  color: var(--primary-blue);
}

.tab-link.active {
  color: var(--primary-blue);
  font-weight: bold;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px; 
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-blue);
}

.tab-pane {
  display: none; 
  padding: 15px 0; 
  animation: fadeIn 0.5s ease; 
}

.tab-pane.active {
  display: block; 
}

.tab-pane p {
    font-size: 1em;
    line-height: 1.7;
    color: var(--dark-text); 
}